mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Add config entities for lumi.motion.agl04 (#82087)
This commit is contained in:
parent
aa443842b7
commit
d47fe35a88
@ -110,6 +110,11 @@ class OppleRemote(ZigbeeChannel):
|
|||||||
"motion_sensitivity": True,
|
"motion_sensitivity": True,
|
||||||
"trigger_indicator": 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":
|
elif self.cluster.endpoint.model == "lumi.motion.ac01":
|
||||||
self.ZCL_INIT_ATTRS = {
|
self.ZCL_INIT_ATTRS = {
|
||||||
"presence": True,
|
"presence": True,
|
||||||
@ -124,7 +129,7 @@ class OppleRemote(ZigbeeChannel):
|
|||||||
|
|
||||||
async def async_initialize_channel_specific(self, from_cache: bool) -> None:
|
async def async_initialize_channel_specific(self, from_cache: bool) -> None:
|
||||||
"""Initialize channel specific."""
|
"""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))
|
interval = self.cluster.get("detection_interval", self.cluster.get(0x0102))
|
||||||
if interval is not None:
|
if interval is not None:
|
||||||
self.debug("Loaded detection interval at startup: %s", interval)
|
self.debug("Loaded detection interval at startup: %s", interval)
|
||||||
|
@ -448,7 +448,9 @@ class ZHANumberConfigurationEntity(ZhaEntity, NumberEntity):
|
|||||||
_LOGGER.debug("read value=%s", value)
|
_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(
|
class AqaraMotionDetectionInterval(
|
||||||
ZHANumberConfigurationEntity, id_suffix="detection_interval"
|
ZHANumberConfigurationEntity, id_suffix="detection_interval"
|
||||||
):
|
):
|
||||||
|
@ -336,7 +336,8 @@ class AqaraMotionSensitivities(types.enum8):
|
|||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@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"):
|
class AqaraMotionSensitivity(ZCLEnumSelectEntity, id_suffix="motion_sensitivity"):
|
||||||
"""Representation of a ZHA motion sensitivity configuration entity."""
|
"""Representation of a ZHA motion sensitivity configuration entity."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user