Toggle a group issues (loose sync)

Hi all.
Well, my HA adventure continues… going well so far (mainly thanks to you guys).

Anyway amazon prime day is coming up soon… so I’m thinking of ordering a load more dash buttons to er… re purpose … hahahah


In our lounge / living room it would be cool to execute a script that would toggle all the lights in the room on and off.

So I had been using,

  • service: homeassistant.toggle
    entity_id: group.lounge_view

The issue is I’ve noticed that some of the hue lights fall out of sync… so you end up with some lights tuning on and others turning off.

Does anyone know the solution here?

The HA front end seems reliable when toggling an entire room. But I can’t work out whats being called??

Sorry if this is making no sense LOL… but any help would really help.


Yeah, it is a bit unclear what you’re trying to do and what’s not working for you.

Do you just want to turn a group of lights (some of which might be on and some might be off) on then off (where they all go on at the same time and off at the same time, possibly repeating that some number of times) and don’t know how to do that? Or are some of the lights not toggling the right number of times, so their ending state is wrong (i.e., on when they should be off, or off when they should be on)?

Yes sorry it wasnt very clear - lol

So basically I want a script that will turn on / off all the lights in the room regardless of their current state.

I was attemtping to use a toggle but I found it unreliable.

Thanks for your help.


So something like this?

      - service: homeassistant.turn_on
        entity_id: group.lounge_view
      - delay: '00:00:02'
      - service: homeassistant.turn_off
        entity_id: group.lounge_view

Of course, when this is done, all the lights/switches defined by group.lounge_view will be off. Is that what you want?

Or, by unreliable, do you mean that some of the lights you tell to toggle don’t actually toggle, or if you toggle them multiple times, at the end, they’re not in the state they should be?