2021-12-23 18:34:35 +00:00
|
|
|
"""Constants for the Overkiz (by Somfy) integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from datetime import timedelta
|
|
|
|
from typing import Final
|
|
|
|
|
|
|
|
from pyoverkiz.enums import UIClass
|
|
|
|
from pyoverkiz.enums.ui import UIWidget
|
|
|
|
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
|
|
|
|
DOMAIN: Final = "overkiz"
|
|
|
|
|
|
|
|
CONF_HUB: Final = "hub"
|
|
|
|
DEFAULT_HUB: Final = "somfy_europe"
|
|
|
|
|
|
|
|
UPDATE_INTERVAL: Final = timedelta(seconds=30)
|
|
|
|
UPDATE_INTERVAL_ALL_ASSUMED_STATE: Final = timedelta(minutes=60)
|
|
|
|
|
|
|
|
PLATFORMS: list[Platform] = [
|
2021-12-24 00:21:47 +00:00
|
|
|
Platform.BUTTON,
|
2021-12-27 11:35:59 +00:00
|
|
|
Platform.LIGHT,
|
2021-12-23 23:28:01 +00:00
|
|
|
Platform.LOCK,
|
2021-12-24 20:29:51 +00:00
|
|
|
Platform.NUMBER,
|
2021-12-23 18:34:35 +00:00
|
|
|
Platform.SENSOR,
|
|
|
|
]
|
|
|
|
|
|
|
|
IGNORED_OVERKIZ_DEVICES: list[UIClass | UIWidget] = [
|
|
|
|
UIClass.PROTOCOL_GATEWAY,
|
|
|
|
UIClass.POD,
|
|
|
|
]
|
2021-12-23 23:28:01 +00:00
|
|
|
|
|
|
|
# Used to map the Somfy widget and ui_class to the Home Assistant platform
|
|
|
|
OVERKIZ_DEVICE_TO_PLATFORM: dict[UIClass | UIWidget, Platform] = {
|
|
|
|
UIClass.DOOR_LOCK: Platform.LOCK,
|
2021-12-27 11:35:59 +00:00
|
|
|
UIClass.LIGHT: Platform.LIGHT,
|
2021-12-23 23:28:01 +00:00
|
|
|
}
|