There seem to be no additional logging available from the Hue or Light integrations, nor the underlying aiohue package. I upgraded to the latest HA Core, but this did not help. There is not any change in on/off switch behavior.
I added some logging to the aiohue lights.py set_state function.
There is only one request sent to the Hue Bridge, and it is a simple one. It contains a key difference vs what I tried myself: “alert”.
This “alert” : “none” is the culprit causing the additional “on + off” flashing when sending an “on” : True request. It does not flash with an “on” : False request.
Seems like this is also happening with other third party lights (LIDL light strips) via the Hue bridge.
And the Hue integration already has a workaround for lights from manufacturer “Innr” in the code, which needs expanding.
Modified temporarily myself.
# diff light.py.original light.py
--- light.py.original
+++ light.py
@@ -213,12 +213,14 @@
self.is_osram = False
self.is_philips = False
self.is_innr = False
+ self.is_ewelink = False
self.gamut_typ = GAMUT_TYPE_UNAVAILABLE
self.gamut = None
else:
self.is_osram = light.manufacturername == "OSRAM"
self.is_philips = light.manufacturername == "Philips"
self.is_innr = light.manufacturername == "innr"
+ self.is_ewelink = light.manufacturername == "eWeLink"
self.gamut_typ = self.light.colorgamuttype
self.gamut = self.light.colorgamut
_LOGGER.debug("Color gamut of %s: %s", self.name, str(self.gamut))
@@ -402,7 +404,7 @@
elif flash == FLASH_SHORT:
command["alert"] = "select"
del command["on"]
- elif not self.is_innr:
+ elif not (self.is_innr or self.is_ewelink):
command["alert"] = "none"
if ATTR_EFFECT in kwargs:
After this change, the on/off switches works as expected. No more “flashing” when turning on.