From 7069fb9508daf81643e670b102f7db4090b3a1c5 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Sat, 27 Jan 2024 10:40:23 -0500 Subject: [PATCH] Add model check to ZHA Sonoff manufacturer specific cluster handler (#108947) --- .../zha/core/cluster_handlers/manufacturerspecific.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/zha/core/cluster_handlers/manufacturerspecific.py b/homeassistant/components/zha/core/cluster_handlers/manufacturerspecific.py index 732a580759e..9375ecf60b1 100644 --- a/homeassistant/components/zha/core/cluster_handlers/manufacturerspecific.py +++ b/homeassistant/components/zha/core/cluster_handlers/manufacturerspecific.py @@ -430,4 +430,8 @@ class XiaomiVibrationAQ1ClusterHandler(MultistateInputClusterHandler): class SonoffPresenceSenorClusterHandler(ClusterHandler): """SonoffPresenceSensor cluster handler.""" - ZCL_INIT_ATTRS = {"last_illumination_state": True} + def __init__(self, cluster: zigpy.zcl.Cluster, endpoint: Endpoint) -> None: + """Initialize SonoffPresenceSensor cluster handler.""" + super().__init__(cluster, endpoint) + if self.cluster.endpoint.model == "SNZB-06P": + self.ZCL_INIT_ATTRS = {"last_illumination_state": True}