mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Add "power outage memory" config entity to Xiaomi EU plugs to ZHA (#80444)
This commit is contained in:
parent
f4f7122c66
commit
5eb69f38aa
@ -62,7 +62,7 @@ class PhillipsRemote(ZigbeeChannel):
|
|||||||
@registries.CHANNEL_ONLY_CLUSTERS.register(0xFCC0)
|
@registries.CHANNEL_ONLY_CLUSTERS.register(0xFCC0)
|
||||||
@registries.ZIGBEE_CHANNEL_REGISTRY.register(0xFCC0)
|
@registries.ZIGBEE_CHANNEL_REGISTRY.register(0xFCC0)
|
||||||
class OppleRemote(ZigbeeChannel):
|
class OppleRemote(ZigbeeChannel):
|
||||||
"""Opple button channel."""
|
"""Opple channel."""
|
||||||
|
|
||||||
REPORT_CONFIG = ()
|
REPORT_CONFIG = ()
|
||||||
|
|
||||||
@ -82,6 +82,10 @@ class OppleRemote(ZigbeeChannel):
|
|||||||
"motion_sensitivity": True,
|
"motion_sensitivity": True,
|
||||||
"approach_distance": True,
|
"approach_distance": True,
|
||||||
}
|
}
|
||||||
|
elif self.cluster.endpoint.model in ("lumi.plug.mmeu01", "lumi.plug.maeu01"):
|
||||||
|
self.ZCL_INIT_ATTRS = {
|
||||||
|
"power_outage_memory": True,
|
||||||
|
}
|
||||||
|
|
||||||
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."""
|
||||||
|
@ -293,6 +293,18 @@ class P1MotionTriggerIndicatorSwitch(
|
|||||||
_attr_name = "LED trigger indicator"
|
_attr_name = "LED trigger indicator"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names="opple_cluster", models={"lumi.plug.mmeu01", "lumi.plug.maeu01"}
|
||||||
|
)
|
||||||
|
class XiaomiPlugPowerOutageMemorySwitch(
|
||||||
|
ZHASwitchConfigurationEntity, id_suffix="power_outage_memory"
|
||||||
|
):
|
||||||
|
"""Representation of a ZHA power outage memory configuration entity."""
|
||||||
|
|
||||||
|
_zcl_attribute: str = "power_outage_memory"
|
||||||
|
_attr_name = "Power outage memory"
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
channel_names="ikea_airpurifier",
|
channel_names="ikea_airpurifier",
|
||||||
models={"STARKVIND Air purifier", "STARKVIND Air purifier table"},
|
models={"STARKVIND Air purifier", "STARKVIND Air purifier table"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user