Fix availability for 3th party Hue lights (#61603)

This commit is contained in:
Marcel van der Veldt
2021-12-12 23:12:35 +01:00
committed by GitHub
parent cd001d0243
commit ed8d5c09ff

View File

@@ -103,6 +103,9 @@ class HueBaseEntity(Entity):
if self.resource.type == ResourceTypes.ZIGBEE_CONNECTIVITY:
# the zigbee connectivity sensor itself should be always available
return True
if self.device.product_data.manufacturer_name != "Signify Netherlands B.V.":
# availability status for non-philips brand lights is unreliable
return True
if zigbee := self.bridge.api.devices.get_zigbee_connectivity(self.device.id):
# all device-attached entities get availability from the zigbee connectivity
return zigbee.status == ConnectivityServiceStatus.CONNECTED