mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix Hue SONOFF S31 Lite zb plug (#69589)
* Update light.py Same issue as https://github.com/home-assistant/core/issues/46619 with SONOFF S13 Lite Zigbee plug. * Update light.py
This commit is contained in:
parent
cc7b624418
commit
72cb320ed7
@ -341,6 +341,7 @@ class HueLight(CoordinatorEntity, LightEntity):
|
|||||||
self.is_innr = False
|
self.is_innr = False
|
||||||
self.is_ewelink = False
|
self.is_ewelink = False
|
||||||
self.is_livarno = False
|
self.is_livarno = False
|
||||||
|
self.is_s31litezb = False
|
||||||
self.gamut_typ = GAMUT_TYPE_UNAVAILABLE
|
self.gamut_typ = GAMUT_TYPE_UNAVAILABLE
|
||||||
self.gamut = None
|
self.gamut = None
|
||||||
else:
|
else:
|
||||||
@ -349,6 +350,7 @@ class HueLight(CoordinatorEntity, LightEntity):
|
|||||||
self.is_innr = light.manufacturername == "innr"
|
self.is_innr = light.manufacturername == "innr"
|
||||||
self.is_ewelink = light.manufacturername == "eWeLink"
|
self.is_ewelink = light.manufacturername == "eWeLink"
|
||||||
self.is_livarno = light.manufacturername.startswith("_TZ3000_")
|
self.is_livarno = light.manufacturername.startswith("_TZ3000_")
|
||||||
|
self.is_s31litezb = light.modelid == "S31 Lite zb"
|
||||||
self.gamut_typ = self.light.colorgamuttype
|
self.gamut_typ = self.light.colorgamuttype
|
||||||
self.gamut = self.light.colorgamut
|
self.gamut = self.light.colorgamut
|
||||||
LOGGER.debug("Color gamut of %s: %s", self.name, str(self.gamut))
|
LOGGER.debug("Color gamut of %s: %s", self.name, str(self.gamut))
|
||||||
@ -554,7 +556,12 @@ class HueLight(CoordinatorEntity, LightEntity):
|
|||||||
elif flash == FLASH_SHORT:
|
elif flash == FLASH_SHORT:
|
||||||
command["alert"] = "select"
|
command["alert"] = "select"
|
||||||
del command["on"]
|
del command["on"]
|
||||||
elif not self.is_innr and not self.is_ewelink and not self.is_livarno:
|
elif (
|
||||||
|
not self.is_innr
|
||||||
|
and not self.is_ewelink
|
||||||
|
and not self.is_livarno
|
||||||
|
and not self.is_s31litezb
|
||||||
|
):
|
||||||
command["alert"] = "none"
|
command["alert"] = "none"
|
||||||
|
|
||||||
if ATTR_EFFECT in kwargs:
|
if ATTR_EFFECT in kwargs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user