Minor ZHA consts fixes (#22049)
* Use consts for zha.core.consts * Fix ZHA battery reporting config.
This commit is contained in:
parent
dcaced1966
commit
9575c20b7c
1 changed files with 14 additions and 8 deletions
|
@ -1,6 +1,12 @@
|
|||
"""All constants related to the ZHA component."""
|
||||
import enum
|
||||
|
||||
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR
|
||||
from homeassistant.components.fan import DOMAIN as FAN
|
||||
from homeassistant.components.light import DOMAIN as LIGHT
|
||||
from homeassistant.components.sensor import DOMAIN as SENSOR
|
||||
from homeassistant.components.switch import DOMAIN as SWITCH
|
||||
|
||||
DOMAIN = 'zha'
|
||||
|
||||
BAUD_RATES = [
|
||||
|
@ -17,13 +23,13 @@ DATA_ZHA_CORE_EVENTS = 'zha_core_events'
|
|||
DATA_ZHA_GATEWAY = 'zha_gateway'
|
||||
ZHA_DISCOVERY_NEW = 'zha_discovery_new_{}'
|
||||
|
||||
COMPONENTS = [
|
||||
'binary_sensor',
|
||||
'fan',
|
||||
'light',
|
||||
'sensor',
|
||||
'switch',
|
||||
]
|
||||
COMPONENTS = (
|
||||
BINARY_SENSOR,
|
||||
FAN,
|
||||
LIGHT,
|
||||
SENSOR,
|
||||
SWITCH,
|
||||
)
|
||||
|
||||
CONF_BAUDRATE = 'baudrate'
|
||||
CONF_DATABASE = 'database_path'
|
||||
|
@ -141,7 +147,7 @@ REPORT_CONFIG_DEFAULT = (REPORT_CONFIG_MIN_INT, REPORT_CONFIG_MAX_INT,
|
|||
REPORT_CONFIG_ASAP = (REPORT_CONFIG_MIN_INT_ASAP, REPORT_CONFIG_MAX_INT,
|
||||
REPORT_CONFIG_RPT_CHANGE)
|
||||
REPORT_CONFIG_BATTERY_SAVE = (REPORT_CONFIG_MIN_INT_BATTERY_SAVE,
|
||||
REPORT_CONFIG_MAX_INT,
|
||||
REPORT_CONFIG_MAX_INT_BATTERY_SAVE,
|
||||
REPORT_CONFIG_RPT_CHANGE)
|
||||
REPORT_CONFIG_IMMEDIATE = (REPORT_CONFIG_MIN_INT_IMMEDIATE,
|
||||
REPORT_CONFIG_MAX_INT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue