hass-core/homeassistant/components/homekit_controller/const.py
Jc2k 944b544b2e
Add support for Homekit accessory battery sensors (#26210)
* Add simple battery sensor
* Add test for battery sensor based on a real device
* Vary icon based on battery state
* Add test for battery sensory
* Read other battery related states from accessory
* Add a device class to the battery sensor
* Respect the low battery flag from the device
2019-08-31 13:18:18 +01:00

29 lines
816 B
Python

"""Constants for the homekit_controller component."""
DOMAIN = "homekit_controller"
KNOWN_DEVICES = "{}-devices".format(DOMAIN)
CONTROLLER = "{}-controller".format(DOMAIN)
ENTITY_MAP = "{}-entity-map".format(DOMAIN)
HOMEKIT_DIR = ".homekit"
PAIRING_FILE = "pairing.json"
# Mapping from Homekit type to component.
HOMEKIT_ACCESSORY_DISPATCH = {
"lightbulb": "light",
"outlet": "switch",
"switch": "switch",
"thermostat": "climate",
"security-system": "alarm_control_panel",
"garage-door-opener": "cover",
"window": "cover",
"window-covering": "cover",
"lock-mechanism": "lock",
"contact": "binary_sensor",
"motion": "binary_sensor",
"carbon-dioxide": "sensor",
"humidity": "sensor",
"light": "sensor",
"temperature": "sensor",
"battery": "sensor",
}