Mixed Entity Groups

I try to setup new groups retiring the legacy groups. But there is no group, that would group lights, switches, input_boolean together.

These are the exact entities I would need to control a whole room and share with MatterHub.

There is currently no group that is able to do so. Please enable us to create such a group.

The “new” group helpers aren’t really new, they’re mostly a way to create entities in the UI that were previously YAML-only.

Labels can now cover most of the situations that used to be the purview of groups. They can be used as action targets and queried using templates. You can add or remove them manually in the UI or automated their management with Spook’s label management actions.

So I use this group today:

Buro:
  name: Büro
  entities:
    - switch.r1_licht
    - light.r1_lampen1
    - switch.r1_lampe2
    - input_boolean.buro_lampe
    - light.r1_schreibtischlampe
    - light.r1_led

This is currently one “switch” that can be turned on and off, but will not turn on all entities even though it is in on-state because one entity is turned on. I also was able to share this group with alexa.

I don’t really get how labels can do this. Happy if you could explain how this works
I

That applies if you are only talking about the Dashboard, but a generic turn on action could still cause all entities to turn on… due to how the group is expanded when used as a target entity.

action: homeassistant.turn_on
target:
  entity_id:
    - group.buro
data: {}

If you want a “switch”, I would use a template switch. The following will work exactly like your group, but you can easily add or remove group members in the UI through Labels; and it can be setup either in YAML or as a Helper in the UI, and it will be visible to Alexa as a switch.

# Example configuration.yaml entry
switch:
  - platform: template
    switches:
      buro_lichter_und_lampen:
        value_template: "{{ label_entities('Buro Lichter') | select('is_state', 'on') | list | count > 0 }}"
        turn_on:
          action: homeassistant.turn_on
          target:
            label_id: buro_lichter
        turn_off:
          action: homeassistant.turn_off
          target:
            label_id: buro_lichter

Additionally, conditions could be added to the actions so that the dashboard behavior you described as “but will not turn on all entities even though it is in on-state because one entity is turned on” also applies for automations, scripts, etc.

The value_template used above is equivalent to the “all/All Entities” option being “off”, an equivalent to it being “on” would be:

{{ label_entities('Buro Lichter') | select('is_state', 'off') | list | count == 0 }}