core/homeassistant/components/xiaomi_aqara/const.py

64 lines
1.1 KiB
Python
Raw Normal View History

Add Xiaomi Aqara Config Flow (#35595) * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow First tested and working version * Remove depricated discovery * Add Xiaomi Aqara Config Flow * Add Xiaomi Aqara tests * Update .coveragerc * Update requirements_test_all.txt * fix spelling mistake * fix select scheme * fix wrong conflict resolve * add IP to zeroconf discovery title * black styling * add getmac requirement Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com> * add getmac * add getmac * Clean up * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * resolve data storage * move format_mac down * Remove discovery_retry from config flow * remove unused strings * fix styling * fix black styling * fix tests * remove mac connection This is needed to prevent a conflict with the Xiaomi Miio integration that I discovered during testing. * fix flake8 * remove getmac depandance * check for inavlid_interface + test * Validate gateway key * add invalid key tests * Fix spelling * Only set up sensors if no key Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 09:54:17 +00:00
"""Constants of the Xiaomi Aqara component."""
DOMAIN = "xiaomi_aqara"
GATEWAYS_KEY = "gateways"
LISTENER_KEY = "listener"
ZEROCONF_GATEWAY = "lumi-gateway"
ZEROCONF_ACPARTNER = "lumi-acpartner"
Add Xiaomi Aqara Config Flow (#35595) * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow * Xiaomi Aqara Config Flow First tested and working version * Remove depricated discovery * Add Xiaomi Aqara Config Flow * Add Xiaomi Aqara tests * Update .coveragerc * Update requirements_test_all.txt * fix spelling mistake * fix select scheme * fix wrong conflict resolve * add IP to zeroconf discovery title * black styling * add getmac requirement Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com> * add getmac * add getmac * Clean up * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/xiaomi_aqara/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * resolve data storage * move format_mac down * Remove discovery_retry from config flow * remove unused strings * fix styling * fix black styling * fix tests * remove mac connection This is needed to prevent a conflict with the Xiaomi Miio integration that I discovered during testing. * fix flake8 * remove getmac depandance * check for inavlid_interface + test * Validate gateway key * add invalid key tests * Fix spelling * Only set up sensors if no key Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 09:54:17 +00:00
CONF_INTERFACE = "interface"
CONF_KEY = "key"
CONF_SID = "sid"
DEFAULT_DISCOVERY_RETRY = 5
BATTERY_MODELS = [
"sensor_ht",
"weather",
"weather.v1",
"sensor_motion.aq2",
"vibration",
"magnet",
"sensor_magnet",
"sensor_magnet.aq2",
"motion",
"sensor_motion",
"sensor_motion.aq2",
"switch",
"sensor_switch",
"sensor_switch.aq2",
"sensor_switch.aq3",
"remote.b1acn01",
"86sw1",
"sensor_86sw1",
"sensor_86sw1.aq1",
"remote.b186acn01",
"remote.b186acn02",
"86sw2",
"sensor_86sw2",
"sensor_86sw2.aq1",
"remote.b286acn01",
"remote.b286acn02",
"cube",
"sensor_cube",
"sensor_cube.aqgl01",
"smoke",
"sensor_smoke",
"sensor_wleak.aq1",
"vibration",
"vibration.aq1",
"curtain",
"curtain.aq2",
"curtain.hagl04",
"lock.aq1",
"lock.acn02",
]
POWER_MODELS = [
"86plug",
"ctrl_86plug",
"ctrl_86plug.aq1",
]