Add dynamic subscription for ZHA add device page (#22164)
* add ws subscription for zha gateway messages * add debug mode * only relay certain logs * add missing require admin * add devices command * add area_id * fix manufacturer code
This commit is contained in:
parent
05db444832
commit
46ece3603f
3 changed files with 233 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
"""All constants related to the ZHA component."""
|
||||
import enum
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR
|
||||
from homeassistant.components.fan import DOMAIN as FAN
|
||||
|
@ -106,6 +107,34 @@ QUIRK_CLASS = 'quirk_class'
|
|||
MANUFACTURER_CODE = 'manufacturer_code'
|
||||
POWER_SOURCE = 'power_source'
|
||||
|
||||
BELLOWS = 'bellows'
|
||||
ZHA = 'homeassistant.components.zha'
|
||||
ZIGPY = 'zigpy'
|
||||
ZIGPY_XBEE = 'zigpy_xbee'
|
||||
ZIGPY_DECONZ = 'zigpy_deconz'
|
||||
ORIGINAL = 'original'
|
||||
CURRENT = 'current'
|
||||
DEBUG_LEVELS = {
|
||||
BELLOWS: logging.DEBUG,
|
||||
ZHA: logging.DEBUG,
|
||||
ZIGPY: logging.DEBUG,
|
||||
ZIGPY_XBEE: logging.DEBUG,
|
||||
ZIGPY_DECONZ: logging.DEBUG,
|
||||
}
|
||||
ADD_DEVICE_RELAY_LOGGERS = [ZHA, ZIGPY]
|
||||
TYPE = 'type'
|
||||
NWK = 'nwk'
|
||||
SIGNATURE = 'signature'
|
||||
RAW_INIT = 'raw_device_initialized'
|
||||
ZHA_GW_MSG = 'zha_gateway_message'
|
||||
DEVICE_REMOVED = 'device_removed'
|
||||
DEVICE_INFO = 'device_info'
|
||||
DEVICE_FULL_INIT = 'device_fully_initialized'
|
||||
DEVICE_JOINED = 'device_joined'
|
||||
LOG_OUTPUT = 'log_output'
|
||||
LOG_ENTRY = 'log_entry'
|
||||
MFG_CLUSTER_ID_START = 0xfc00
|
||||
|
||||
|
||||
class RadioType(enum.Enum):
|
||||
"""Possible options for radio type."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue