* Initial commit * Add gios to requirements * Add tests * Update .coveragerc file * Run gen_requirements_all.py * Change DEFAULT_SCAN_INTERVAL * Better strings * Bump library version * run script.hassfest * run isort * Add icons mapping * Remove unnecessary f-string * Remove unnecessary listener * Refactoring config_flow * Add unique_id to config entry * Change AQI states to consts in English * Remove unused init * Remove unused exception * Remove private instance attribute * Remove overwrite state property * Fix pylint error * Add SCAN_INTERVAL for air_quality entity * Add _abort_if_unique_id_configured()
25 lines
668 B
Python
25 lines
668 B
Python
"""Constants for GIOS integration."""
|
|
from datetime import timedelta
|
|
|
|
ATTR_NAME = "name"
|
|
ATTR_STATION = "station"
|
|
CONF_STATION_ID = "station_id"
|
|
DATA_CLIENT = "client"
|
|
DEFAULT_NAME = "GIOŚ"
|
|
# Term of service GIOŚ allow downloading data no more than twice an hour.
|
|
DEFAULT_SCAN_INTERVAL = timedelta(minutes=30)
|
|
DOMAIN = "gios"
|
|
|
|
AQI_GOOD = "dobry"
|
|
AQI_MODERATE = "umiarkowany"
|
|
AQI_POOR = "dostateczny"
|
|
AQI_VERY_GOOD = "bardzo dobry"
|
|
AQI_VERY_POOR = "zły"
|
|
|
|
ICONS_MAP = {
|
|
AQI_VERY_GOOD: "mdi:emoticon-excited",
|
|
AQI_GOOD: "mdi:emoticon-happy",
|
|
AQI_MODERATE: "mdi:emoticon-neutral",
|
|
AQI_POOR: "mdi:emoticon-sad",
|
|
AQI_VERY_POOR: "mdi:emoticon-dead",
|
|
}
|