Groups...or many things at once

Is it possible to create one button that turns on multiple things at once? Like a macro used to do.

Here’s what I’m turning on all at once… or would like to.

tv:
 
    entities:
      - media_player.shield
      - switch.living_room_ambient_tv 
      - switch.living_room_tv
      - light.tv_stand

That way one button instead of 4…

Thanks all!

There’s UI support for groups coming in 2022.4

1 Like

Yes I went that way first and got a config error

Invalid config for [group]: [tv] is an invalid option for [group]. Check: group->group->group->tv. (See /config/configuration.yaml, line 63).

group:
  tv:
    name: Livingroom TV
    entities:
      - switch.living_room_tv
      - switch.living_room_ambient_tv
      - light.tv_stand
      - media_player.shield

Try this:

group:
  livingroom_tv:
    name: Livingroom TV
    entities:
      - switch.living_room_tv
      - switch.living_room_ambient_tv
      - light.tv_stand
      - media_player.shield
lv_tv:
  name: LV TV
  entities:
    - media_player.family_room_tv_2
    - switch.living_room_ambient_tv
    - light.tv_stand
    - media_player.shield

Thank you Tom… this is what I ended up with because if I left group: it shows up in the developer window as group.group. Chaneged the top to lv_tv and now it shows group.lv_tv :slight_smile:

AND it works! :slight_smile:

Yes if you are putting that in groups.yaml then the group: part is already included in your configuration.yaml file here:

group: !include groups.yaml

That include line is equivalent to listing the contents of the groups.yaml file under group:

1 Like