Only try initializing Hue motion LED on endpoint 2 with ZHA (#81205)

This commit is contained in:
TheJulianJES 2022-11-01 02:22:21 +01:00 committed by Paulus Schoutsen
parent 3ddcc637da
commit 7046f5f19e

View File

@ -156,7 +156,7 @@ class BasicChannel(ZigbeeChannel):
def __init__(self, cluster: zigpy.zcl.Cluster, ch_pool: ChannelPool) -> None: def __init__(self, cluster: zigpy.zcl.Cluster, ch_pool: ChannelPool) -> None:
"""Initialize Basic channel.""" """Initialize Basic channel."""
super().__init__(cluster, ch_pool) super().__init__(cluster, ch_pool)
if is_hue_motion_sensor(self): if is_hue_motion_sensor(self) and self.cluster.endpoint.endpoint_id == 2:
self.ZCL_INIT_ATTRS = ( # pylint: disable=invalid-name self.ZCL_INIT_ATTRS = ( # pylint: disable=invalid-name
self.ZCL_INIT_ATTRS.copy() self.ZCL_INIT_ATTRS.copy()
) )