More robust turn_on / turn_off

When activating scenes with a lot of lights & switches often one or two of the lights or switches turn on but HA never receives the notification that it was turned on or off (or sometimes the light never turn on/off). I’m guessing this is due to packets getting lost in the mesh somewhere / sometime.
Ideally in a perfect world this never should happen but alas…

Idea: Implement a “robust turn_on / turn_off” function where HA will look for the state change to occur, and if it doesn’t in a reasonably time automatically will retry the operation - a configurable number of times.

This would also have the added benefit of when changing the state of devices and then taking en entities_snapshot you don’t have to implement a delay (or wait for a state change which seems to work for single lights/switches - unless the notification disappears …)

I also created timer and template sensor, to assume turn on, because when I turn on light, my light reports its turn on with a delay. So repeat and assume turn on will be nice

What protocol are you using? I never had any issue with lights not turning on.

I have some z-wave devices that don’t turn on/off reliably. Especially when I have an automation that turns on multiple z-wave devices at once, something seems to get lost periodically. I’ve had luck putting a multi-second delay between each switch.turn_on invocation, but what I really want is a monitor/retry mechanism.

I’m using zigbee via ZHA and a ConBee II USB stick (on an extender cable, and latest firmware).
I used to control my lights and switches via an IKEA Gateway but decided to try a “pure” ZHA/Conbee solution instead so it’s now a mesh of about 50 devices.

So when I apply a scene I typically turn on/off some 20lights/plugs at the same time.

I think it might have been slightly more stable doing it via the Ikea gateway but if that’s due to less total devices (all the sensors & remotes on the zha/conbee network lights/plugs on ikea) or just a coincidence I don’t know.

One possible reason for the dropped messages could also be the know firmware bug in the Ikea lamps&switches (and many other manufacturers devices probably):

But no matter what the cause is I still think a more robust “action” would be a good thing to have.

Are these lights in a zigbee group (not HA group) or individual lights? If they are not in a zigbee group, it’s “normal” that they don’ switch off at the same time or at all.
E.g. you have 10 bulbs in the livingroom,when you turn of these bulbs from HA even if you grouped them in HA, it will send 10 commands to the ConBee, which can lead to delays or missed measages. However if you put them in a zigbee group, HA will only send one command to the ConBee and the zigbee mesh propagates it accordingly.
I use a ConBee as well and in one scene I turn off 16 bulbs at the same time and they go off all at the same time and all of them.

1 Like

HA scenes actually - so individually. I’ve tried the zigbee group way too btw. And yes, the lights go on but then they all concurrently try to send status change updates and some of those get lost instead (sometimes).

It’s a bit of a pain to maintain those zigbee groups btw since not all lights are supposed to turn on/off at same time at the different times of the day (early morning, morning, sunrise, sunset, late evening, night). And not all lights are supposed to get the same settings (color/intensity) either. And some are lights controlled by plugs. So the number of zigbee groups to maintain via manual configuration grows fast. Configure-wise it’s much easier with ‘scenes’ configured via the UI.

That doesn’t sound normal, I never had a bulb not updating the status correctly over the last 3+ years with zigbee groups.