Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Const file for the MyBMW integration."""
2 
3 from homeassistant.const import UnitOfLength, UnitOfVolume
4 
5 DOMAIN = "bmw_connected_drive"
6 
7 ATTR_DIRECTION = "direction"
8 ATTR_VIN = "vin"
9 
10 CONF_ALLOWED_REGIONS = ["china", "north_america", "rest_of_world"]
11 CONF_CAPTCHA_REGIONS = ["north_america", "rest_of_world"]
12 CONF_READ_ONLY = "read_only"
13 CONF_ACCOUNT = "account"
14 CONF_REFRESH_TOKEN = "refresh_token"
15 CONF_GCID = "gcid"
16 CONF_CAPTCHA_TOKEN = "captcha_token"
17 CONF_CAPTCHA_URL = (
18  "https://bimmer-connected.readthedocs.io/en/stable/captcha/{region}.html"
19 )
20 
21 DATA_HASS_CONFIG = "hass_config"
22 
23 UNIT_MAP = {
24  "KILOMETERS": UnitOfLength.KILOMETERS,
25  "MILES": UnitOfLength.MILES,
26  "LITERS": UnitOfVolume.LITERS,
27  "GALLONS": UnitOfVolume.GALLONS,
28 }
29 
30 SCAN_INTERVALS = {
31  "china": 300,
32  "north_america": 600,
33  "rest_of_world": 300,
34 }