* Change BMW connected drive to async * Fix coordinator exceptions, fix tests * Fix using deprecated property * Write HA state directly * Remove code that cannnot throw Exceptions from try/except * Use public async_write_ha_state Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Fix login using refresh_token if token expired * MyPy fixes * Fix pytest, bump dependency * Replace OptionFlow listener with explicit refresh * Remove uneeded async_get_entry * Update test to include change on OptionsFlow * Bump bimmer_connected to 0.9.0 * Migrate renamed entitity unique_ids * Don't replace async_migrate_entries, add tests * Rename existing_entry to existing_entry_id Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update tests * Import full EntityRegistry * Fix comment * Increase timeout to 60s * Rely on library timeout Co-authored-by: rikroe <rikroe@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
28 lines
611 B
Python
28 lines
611 B
Python
"""Const file for the MyBMW integration."""
|
|
from homeassistant.const import (
|
|
LENGTH_KILOMETERS,
|
|
LENGTH_MILES,
|
|
VOLUME_GALLONS,
|
|
VOLUME_LITERS,
|
|
)
|
|
|
|
DOMAIN = "bmw_connected_drive"
|
|
ATTRIBUTION = "Data provided by MyBMW"
|
|
|
|
ATTR_DIRECTION = "direction"
|
|
ATTR_VIN = "vin"
|
|
|
|
CONF_ALLOWED_REGIONS = ["china", "north_america", "rest_of_world"]
|
|
CONF_READ_ONLY = "read_only"
|
|
CONF_ACCOUNT = "account"
|
|
CONF_REFRESH_TOKEN = "refresh_token"
|
|
|
|
DATA_HASS_CONFIG = "hass_config"
|
|
|
|
UNIT_MAP = {
|
|
"KILOMETERS": LENGTH_KILOMETERS,
|
|
"MILES": LENGTH_MILES,
|
|
"LITERS": VOLUME_LITERS,
|
|
"GALLONS": VOLUME_GALLONS,
|
|
}
|