Automation on groups

Hi community,

can someone please point me how to do a time based automation within a group?

Background:
I’ve defined a group with a lot of LED chains and bulbs in groups.yaml. Now I want them to switch on at 7:00pm and of at 1:00am with automations. In the UI I can only select a device.

Is it realy needed to add every single device to the automation? So for me it will be 21 devices in the list.

Thanks

2 Likes

Hey Wolly,

would probably be the easiest to just create a light group and use call service as the automation action. There, choose light.turn_on as the service and set the newly created group as the entity_id.

4 Likes

Thanks, seems my approach was not the best one, will try.

It looks like I can’t get the "light group’ to work. Here is what I inserted into the configuration.yaml:

light:
  - platform: group
    name: xmas_lights
    entities:
    - switch.xmas_dach_xmas_dach
    - switch.tasmota_xmas_kueche_unten
    - switch.tasmota_xmas_kueche_unten_2
    - switch.tasmota_xmas_nbuero
    - switch.tasmota_xmas_wohnz_oben
    - a.s.o.

But I can’t see any ‘light.xmas_lights’ with my entity_id list.

You can only use light.xyz entities for the light group. Either check Tasmota so that it introduces itself as a light (some SetOption) or use normal groups: https://www.home-assistant.io/integrations/group/

1 Like

None of those entities are lights.

1 Like

Using normal groups brings me back to the topic how to use an automation with groups.

2 Likes
action:
  service: homeassistant.turn_on
  entity_id: group.switches_that_should_be_lights
8 Likes

tnx mf_social - that did the job :grinning:

1 Like

Just to add a tiny bit of information which might be helpful to others - besides homeassistant.turn_on you can also use homeassistant.toggle if you prefer.

1 Like