Group automation

What is right to turn switches inside a group on?

switch.turn_on

or

homeassistant.turn_on

or even

light.turn_on

I had the problem that light inside a group turned on with switch.turn_off but not off so i aksed myself what is the right service?

I’m not sure which is the official correct way.

But currently this works for me:

action:
service: homeassistant.turn_on
entity_id: group.group_lights

1 Like

homeassistant.turn_on/off works for mixed groups so its what I tend to use. I’ve not seen any negative effects using it even when you know switch or light will work.

strange homeasssistant.turn_off works with a switch group but homeassistant.turn_on seams not working…but switch.turn_on also not…strange.

Does it matter if in the group is only a single switch?

Edit: Ups my fault…looks i was sleepy last night.