1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-26 21:05:18 +00:00
Files
core/homeassistant/components/bmw_connected_drive/const.py
brave0d a99ecb024e New BMW sensor for climate activity (#110287)
* add sensor with climate activity status

* Update strings.json

* use icon translation and is_available for sensor

* use enum with translations

* Return None if value is UNKNOWN

* fix getting the value: x.value

* fix getting the value: x instead of x.value

* Fix tests and pre-commit

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-04-16 09:24:32 +02:00

38 lines
792 B
Python

"""Const file for the MyBMW integration."""
from homeassistant.const import UnitOfLength, UnitOfVolume
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"
CONF_GCID = "gcid"
DATA_HASS_CONFIG = "hass_config"
UNIT_MAP = {
"KILOMETERS": UnitOfLength.KILOMETERS,
"MILES": UnitOfLength.MILES,
"LITERS": UnitOfVolume.LITERS,
"GALLONS": UnitOfVolume.GALLONS,
}
SCAN_INTERVALS = {
"china": 300,
"north_america": 600,
"rest_of_world": 300,
}
CLIMATE_ACTIVITY_STATE: list[str] = [
"cooling",
"heating",
"inactive",
"standby",
]