hass-core/homeassistant/components/broadlink/const.py
Marc Mueller f57d42a9e8
Use platform enum (1) [A-D] (#60908)
* Use platform enum (1) [A-D]

* Fix imports

* Fix tests

* Use Platform even in tests
2021-12-03 08:51:30 -08:00

39 lines
721 B
Python

"""Constants."""
from homeassistant.const import Platform
DOMAIN = "broadlink"
DOMAINS_AND_TYPES = {
Platform.REMOTE: {"RM4MINI", "RM4PRO", "RMMINI", "RMMINIB", "RMPRO"},
Platform.SENSOR: {
"A1",
"RM4MINI",
"RM4PRO",
"RMPRO",
"SP2S",
"SP3S",
"SP4",
"SP4B",
},
Platform.SWITCH: {
"BG1",
"MP1",
"RM4MINI",
"RM4PRO",
"RMMINI",
"RMMINIB",
"RMPRO",
"SP1",
"SP2",
"SP2S",
"SP3",
"SP3S",
"SP4",
"SP4B",
},
Platform.LIGHT: {"LB1"},
}
DEVICE_TYPES = set.union(*DOMAINS_AND_TYPES.values())
DEFAULT_PORT = 80
DEFAULT_TIMEOUT = 5