mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Bump ZHA quirks to 109 and add associated configuration entities (#106492)
This commit is contained in:
parent
c462d5b8ca
commit
11e4dd0764
@ -149,6 +149,17 @@ class OppleRemote(ClusterHandler):
|
||||
"buzzer": True,
|
||||
"linkage_alarm": True,
|
||||
}
|
||||
elif self.cluster.endpoint.model == "lumi.magnet.ac01":
|
||||
self.ZCL_INIT_ATTRS = {
|
||||
"detection_distance": True,
|
||||
}
|
||||
elif self.cluster.endpoint.model == "lumi.switch.acn047":
|
||||
self.ZCL_INIT_ATTRS = {
|
||||
"switch_mode": True,
|
||||
"switch_type": True,
|
||||
"startup_on_off": True,
|
||||
"decoupled_mode": True,
|
||||
}
|
||||
|
||||
async def async_initialize_cluster_handler_specific(self, from_cache: bool) -> None:
|
||||
"""Initialize cluster handler specific."""
|
||||
|
@ -24,7 +24,7 @@
|
||||
"bellows==0.37.4",
|
||||
"pyserial==3.5",
|
||||
"pyserial-asyncio==0.6",
|
||||
"zha-quirks==0.0.108",
|
||||
"zha-quirks==0.0.109",
|
||||
"zigpy-deconz==0.22.3",
|
||||
"zigpy==0.60.2",
|
||||
"zigpy-xbee==0.20.1",
|
||||
|
@ -7,6 +7,8 @@ import logging
|
||||
from typing import TYPE_CHECKING, Any, Self
|
||||
|
||||
from zhaquirks.quirk_ids import TUYA_PLUG_MANUFACTURER, TUYA_PLUG_ONOFF
|
||||
from zhaquirks.xiaomi.aqara.magnet_ac01 import OppleCluster as MagnetAC01OppleCluster
|
||||
from zhaquirks.xiaomi.aqara.switch_acn047 import OppleCluster as T2RelayOppleCluster
|
||||
from zigpy import types
|
||||
from zigpy.zcl.clusters.general import OnOff
|
||||
from zigpy.zcl.clusters.security import IasWd
|
||||
@ -408,6 +410,66 @@ class AqaraApproachDistance(ZCLEnumSelectEntity):
|
||||
_attr_translation_key: str = "approach_distance"
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
cluster_handler_names="opple_cluster", models={"lumi.magnet.ac01"}
|
||||
)
|
||||
class AqaraMagnetAC01DetectionDistance(ZCLEnumSelectEntity):
|
||||
"""Representation of a ZHA detection distance configuration entity."""
|
||||
|
||||
_unique_id_suffix = "detection_distance"
|
||||
_attribute_name = "detection_distance"
|
||||
_enum = MagnetAC01OppleCluster.DetectionDistance
|
||||
_attr_translation_key: str = "detection_distance"
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
cluster_handler_names="opple_cluster", models={"lumi.switch.acn047"}
|
||||
)
|
||||
class AqaraT2RelaySwitchMode(ZCLEnumSelectEntity):
|
||||
"""Representation of a ZHA switch mode configuration entity."""
|
||||
|
||||
_unique_id_suffix = "switch_mode"
|
||||
_attribute_name = "switch_mode"
|
||||
_enum = T2RelayOppleCluster.SwitchMode
|
||||
_attr_translation_key: str = "switch_mode"
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
cluster_handler_names="opple_cluster", models={"lumi.switch.acn047"}
|
||||
)
|
||||
class AqaraT2RelaySwitchType(ZCLEnumSelectEntity):
|
||||
"""Representation of a ZHA switch type configuration entity."""
|
||||
|
||||
_unique_id_suffix = "switch_type"
|
||||
_attribute_name = "switch_type"
|
||||
_enum = T2RelayOppleCluster.SwitchType
|
||||
_attr_translation_key: str = "switch_type"
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
cluster_handler_names="opple_cluster", models={"lumi.switch.acn047"}
|
||||
)
|
||||
class AqaraT2RelayStartupOnOff(ZCLEnumSelectEntity):
|
||||
"""Representation of a ZHA startup on off configuration entity."""
|
||||
|
||||
_unique_id_suffix = "startup_on_off"
|
||||
_attribute_name = "startup_on_off"
|
||||
_enum = T2RelayOppleCluster.StartupOnOff
|
||||
_attr_translation_key: str = "start_up_on_off"
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
cluster_handler_names="opple_cluster", models={"lumi.switch.acn047"}
|
||||
)
|
||||
class AqaraT2RelayDecoupledMode(ZCLEnumSelectEntity):
|
||||
"""Representation of a ZHA switch decoupled mode configuration entity."""
|
||||
|
||||
_unique_id_suffix = "decoupled_mode"
|
||||
_attribute_name = "decoupled_mode"
|
||||
_enum = T2RelayOppleCluster.DecoupledMode
|
||||
_attr_translation_key: str = "decoupled_mode"
|
||||
|
||||
|
||||
class AqaraE1ReverseDirection(types.enum8):
|
||||
"""Aqara curtain reversal."""
|
||||
|
||||
|
@ -780,6 +780,15 @@
|
||||
},
|
||||
"preset": {
|
||||
"name": "Preset"
|
||||
},
|
||||
"detection_distance": {
|
||||
"name": "Detection distance"
|
||||
},
|
||||
"switch_mode": {
|
||||
"name": "Switch mode"
|
||||
},
|
||||
"decoupled_mode": {
|
||||
"name": "Decoupled mode"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
|
@ -2866,7 +2866,7 @@ zeroconf==0.131.0
|
||||
zeversolar==0.3.1
|
||||
|
||||
# homeassistant.components.zha
|
||||
zha-quirks==0.0.108
|
||||
zha-quirks==0.0.109
|
||||
|
||||
# homeassistant.components.zhong_hong
|
||||
zhong-hong-hvac==1.0.9
|
||||
|
@ -2168,7 +2168,7 @@ zeroconf==0.131.0
|
||||
zeversolar==0.3.1
|
||||
|
||||
# homeassistant.components.zha
|
||||
zha-quirks==0.0.108
|
||||
zha-quirks==0.0.109
|
||||
|
||||
# homeassistant.components.zha
|
||||
zigpy-deconz==0.22.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user