Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
import esphome.codegen as cg
|
|
|
|
zigbee_ns = cg.esphome_ns.namespace("zigbee")
|
|
ZigbeeComponent = zigbee_ns.class_("ZigbeeComponent", cg.Component)
|
|
ZigbeeAttribute = zigbee_ns.class_("ZigbeeAttribute", cg.Component)
|
|
BinaryAttrs = zigbee_ns.struct("BinaryAttrs")
|
|
AnalogAttrs = zigbee_ns.struct("AnalogAttrs")
|
|
AnalogAttrsOutput = zigbee_ns.struct("AnalogAttrsOutput")
|
|
|
|
report = zigbee_ns.enum("ZigbeeReportT")
|
|
REPORT = {
|
|
"coordinator": report.ZIGBEE_REPORT_COORDINATOR,
|
|
"enable": report.ZIGBEE_REPORT_ENABLE,
|
|
"force": report.ZIGBEE_REPORT_FORCE,
|
|
}
|
|
|
|
CONF_ON_JOIN = "on_join"
|
|
CONF_WIPE_ON_BOOT = "wipe_on_boot"
|
|
CONF_REPORT = "report"
|
|
CONF_ROUTER = "router"
|
|
CONF_POWER_SOURCE = "power_source"
|
|
POWER_SOURCE = {
|
|
"UNKNOWN": "ZB_ZCL_BASIC_POWER_SOURCE_UNKNOWN",
|
|
"MAINS_SINGLE_PHASE": "ZB_ZCL_BASIC_POWER_SOURCE_MAINS_SINGLE_PHASE",
|
|
"MAINS_THREE_PHASE": "ZB_ZCL_BASIC_POWER_SOURCE_MAINS_THREE_PHASE",
|
|
"BATTERY": "ZB_ZCL_BASIC_POWER_SOURCE_BATTERY",
|
|
"DC_SOURCE": "ZB_ZCL_BASIC_POWER_SOURCE_DC_SOURCE",
|
|
"EMERGENCY_MAINS_CONST": "ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_CONST",
|
|
"EMERGENCY_MAINS_TRANSF": "ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_TRANSF",
|
|
}
|
|
|
|
KEY_ZIGBEE = "zigbee"
|