Add config entities for lumi.motion.agl04 (#82087)
parent
aa443842b7
commit
d47fe35a88
|
@ -110,6 +110,11 @@ class OppleRemote(ZigbeeChannel):
|
|||
"motion_sensitivity": True,
|
||||
"trigger_indicator": True,
|
||||
}
|
||||
elif self.cluster.endpoint.model == "lumi.motion.agl04":
|
||||
self.ZCL_INIT_ATTRS = {
|
||||
"detection_interval": True,
|
||||
"motion_sensitivity": True,
|
||||
}
|
||||
elif self.cluster.endpoint.model == "lumi.motion.ac01":
|
||||
self.ZCL_INIT_ATTRS = {
|
||||
"presence": True,
|
||||
|
@ -124,7 +129,7 @@ class OppleRemote(ZigbeeChannel):
|
|||
|
||||
async def async_initialize_channel_specific(self, from_cache: bool) -> None:
|
||||
"""Initialize channel specific."""
|
||||
if self.cluster.endpoint.model == "lumi.motion.ac02":
|
||||
if self.cluster.endpoint.model in ("lumi.motion.ac02", "lumi.motion.agl04"):
|
||||
interval = self.cluster.get("detection_interval", self.cluster.get(0x0102))
|
||||
if interval is not None:
|
||||
self.debug("Loaded detection interval at startup: %s", interval)
|
||||
|
|
|
@ -448,7 +448,9 @@ class ZHANumberConfigurationEntity(ZhaEntity, NumberEntity):
|
|||
_LOGGER.debug("read value=%s", value)
|
||||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(channel_names="opple_cluster", models={"lumi.motion.ac02"})
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
channel_names="opple_cluster", models={"lumi.motion.ac02", "lumi.motion.agl04"}
|
||||
)
|
||||
class AqaraMotionDetectionInterval(
|
||||
ZHANumberConfigurationEntity, id_suffix="detection_interval"
|
||||
):
|
||||
|
|
|
@ -336,7 +336,8 @@ class AqaraMotionSensitivities(types.enum8):
|
|||
|
||||
|
||||
@CONFIG_DIAGNOSTIC_MATCH(
|
||||
channel_names="opple_cluster", models={"lumi.motion.ac01", "lumi.motion.ac02"}
|
||||
channel_names="opple_cluster",
|
||||
models={"lumi.motion.ac01", "lumi.motion.ac02", "lumi.motion.agl04"},
|
||||
)
|
||||
class AqaraMotionSensitivity(ZCLEnumSelectEntity, id_suffix="motion_sensitivity"):
|
||||
"""Representation of a ZHA motion sensitivity configuration entity."""
|
||||
|
|
Loading…
Reference in New Issue