Turn on light directly without flashing on/off

I have a Philips Hue bridge and a couple of on/off switches, which in HA show up as lights. When I turn them on using light.turn_on they first flash on/off once before a third switch to on and staying on (the switch is toggled 3 times in quick succession, from off - > on - > off - > on). I can’t seem to find any way to change this.

Is this intended behavior? How do I avoid this first unnecessary initial on/off flash?

I’m using a somewhat older version of HA, around 0.116 I think, at the moment. I may try to upgrade when I have the time.

No it is not the intended behaviour,

What sort of on/off switches?

Are you using hue bulbs?

Do you have any automations tied to this light?

3rd party switches. They switch on directly and just once, without the on-off flash, if toggled from Philips Hue app, or even with a voice command to a Google Home Mini.

Only one automation, which only touches one of three plugs that all behave the same. It’s a timed on-off cycle at night, to cycle my humidifier. Every hour between 11 PM and 8 AM, it calls turn on, waits 20 minutes, then calls turn off. Nothing that should trigger this flash+on behavior.

Is the first on/off action registered in the HA Logbook? Any clues there what could be the trigger?

Only a single on event shows up in the Logbook.

I can try to enable some debug logging.

The only other light I have connected to my Hue hub is an original Hue lightstrip. While this one does not flash, it also isn’t instantaneously turning on to the desired brightness, unless I specify transition 0. That doesn’t help with the on/off switches, though.

Also of note is that these on/off switches do not seem to support any brightness setting. Not in the Hue app, at all. And in HA, while brightness can be set, probably doesn’t behave as expected and reverts to 0 or similar. Seems that the behavior is even more weird if I try to specify a brightness (and I wasn’t doing this up to now).

Please specify your problem a little more, it’s very vague and we have no idea what devices you even use and how it’s setup.

  • a couple of on/off switches > what brand/model?
  • they first flash on/off once before a third switch to on > what is ‘they’? Do the lights flash when using the mentioned switched? What kind of lights do you have?
    How does HA communicate with the switches? Through official Philips Hue integration?
1 Like

You are very right, I did not give many details. Perhaps more info will help with finding the solution.

Switches I have are from here: https://m.aliexpress.com/item/4001171734797.html
LELLKI Zigbee socket.
Identifies in the Hue app as from manufacturer eWeLink. Model SA-003-Zigbee. SW 1.0.2.

The “they” and “flashing” refers to the on/off switches toggling twice. I hear the relay inside clearly when it turns on or off, even if there’s nothing connected.

I use the official Hue integration. The switches are by default modelled as lights in HA, and from the HA entity setting they seem to show a full set of capability with brightness, color temperature, and color picker palette, even though they in the Hue app only have on/off state. I have only the Hue bridge for such Zigbee devices.

And if you use the Hue app on your phone to toggle the switches. Do they just toggle once, or the same behaviour as from HA? Please also try that and let us know.

Mentioned that already. It behaves as I would expect when using the Hue app and Google Home (Hue bridge integrated directly with Google Home) voice command - single switch on, no “flashing”.

HA behaves well with the Hue light strip, which does accept brightness etc. I have no other lights or devices hooked up to the Hue bridge, only one light strip and 3 of these on/off switches. Only the on/off switches are affected by the “flash before on” behavior.

The fact that these devices show up as lights in the hue app indicates to me that they are not really Hue compatible. They are not a light.

What happens if you use the local API of the hue bridge?

I believe both Google and Hue uses the web API. But HA uses the local API.

Hue is centered around lights, and they do have their own switches which I suspect behave similarly, if not identical. The switches I bought work just fine with Hue, only the Hue integration in HA is quirky. Also in the Hue app they show up as lights, it’s really the only way. It let me choose an icon, and they have “plug” as an option.

Does anyone have experience with how official Philips on/off switches, or the IKEA switches, from the Hue bridge show up in HA via the Hue integration?

There doesn’t seem to be anything other than lights (besides motion sensors and remote controls) supported by this integration. Perhaps it, or the underlying light type, makes assumptions that do not align with this type of “light”.

Local API PUT request to change state works as I expect. I send “on” : true, and it turns on. No “flashing” behavior.

That was unexpected.
Have you tried to reboot HA and the bridge?

Ha reboot, yes. Not bridge, can’t see the point.

HA is behaving very oddly, and the behavior of the turn_on action with various parameters is even more strange. Hilarious, almost. I’ll try to compile a little list to show what it does.

I’ve tried to add a customizer entry to change the supported_features parameter from its default 63, to 0. The GUI seems to be the only component affected by this. It doesn’t show brightness or color picker any longer. But behavior is the same, and I can still change parameters related to these features when calling turn_on, and still get the same slightly different results. This tells me that the turn_on action doesn’t actually care about supported_features.

Perhaps they would work better with a real zigbee gateway.

Does the actual switch toggle on, off and then on again, or is it just the Lovelace UI display element that toggles like you describe?

1 Like

The physical switch toggles three times: off -> on -> off -> on. In the HA GUI it looks like a single “switched on” event is logged.

Turning it off via HA works properly and only toggles it once, on -> off.