2022.04 - groups feature - how to group input.boolean entities?

Version 2022.04 supports great new features to create groups from the UI.
However, is does not seems possible to create a group from input.boolean entities (helpers).
A group of input.boolean entities can be created via YAML but it would be very nice if this was also possible from the UI.
Hope I am not overlooking a feature I not yet discovered. :wink:

I think that only selected common domains were included in this release, the big one that seemed to be missing for me was the “person” domain. Hopefully other domains will get added in future releases.

Could really use grouping input booleans from the UI right about. Waiting for a raspberry pi 3 to reboot is painful. Been trying to snag a raspberry pi 4 for far too long. :\

1 Like

Also voted for implementation of this feature :slight_smile:

Hi Johnny,

would you mind sharing how?
I could really make use of this!

Thanks in advance!

1 Like

first open your “configuration.yaml” file with a file editor and add the line below (if not yet present)
image

then create a file “groups.yaml” in the same folder as the “configuration.yaml” file (if not yet present).
There you can define your group for booleans
E.g.
image

9 Likes

Still applicable in 2024 :slight_smile:

Would be great to create such groups from the UI, could be separate group or maybe part of binary sensor group.

3 Likes

+1 Not sure why these were omitted either?

2 Likes

Urgh, wanted to create a toggle group and apparently can’t.

Upvoted.

Yes I’m aware I could maintain this through groups.xaml but the Visual Studio add-on is barely usable from a mobile browser, making this an inconvenient option to maintain.

Please add a toggle group type!!

2 Likes

It seems like in a recent update the yaml based groups of input_booleans is broken.

1 Like

Does this create a new toggle that controls the state of the other toggles?

I’ve wasted hours on my own trying to figure this out. The best I’ve got is this template for finding my toggles (specifically those for enabling or disabling motion sensors, but I have no control over it:

states.input_boolean | selectattr('entity_id', 'search', '_motion_sensor_toggle$') | map(attribute='entity_id') | list

The only way for me to control this is to create another toggle and an automation to control them. But the state of this toggle now has to be set based on an accumulation of all other toggles.

I haven’t yet figured this out because I’d be rewriting Home Assistant Groups.

1 Like

I got this working, but it’s very hard-coded, and it only works for me because I’m toggling motion sensors using other toggles that are postfixed with “Motion Sensor Toggle”. You’ll have to modify this to work for you.

This is the automation that controls other motion sensor toggles based on the state of “Motion Sensors Toggle”:

- id: '1718782064647'
  alias: Control Motion Sensor Toggles
  description: ''
  trigger:
  - platform: state
    entity_id:
    - input_boolean.motion_sensors_toggle
    to: 'on'
    id: Turn on - Unconditional
  - platform: state
    entity_id:
    - input_boolean.motion_sensors_toggle
    to: 'off'
    id: Turn off - Unconditional
  - platform: template
    value_template: '{{ states.input_boolean | selectattr(''entity_id'', ''search'',
      ''_motion_sensor_toggle$'') | selectattr(''state'', ''eq'', ''on'') | list |
      length > 0 }}'
    id: Turn off - Conditional
  condition: []
  action:
  - choose:
    - conditions:
      - condition: trigger
        id:
        - Turn on - Unconditional
      sequence:
      - service: input_boolean.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: '{{ states.input_boolean | selectattr(''entity_id'', ''search'',
            ''_motion_sensor_toggle$'') | map(attribute=''entity_id'') | list }}'
    - conditions:
      - condition: or
        conditions:
        - condition: trigger
          id:
          - Turn off - Unconditional
        - condition: and
          conditions:
          - condition: trigger
            id:
            - Turn off - Conditional
          - condition: state
            entity_id: input_boolean.motion_sensors_toggle
            state: 'off'
      sequence:
      - service: input_boolean.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: '{{ states.input_boolean | selectattr(''entity_id'', ''search'',
            ''_motion_sensor_toggle$'') | map(attribute=''entity_id'') | list }}'
  mode: restart

It doesn’t store the previous state. So if I re-enable motion sensor toggles, if any were off or supposed to be off, it doesn’t care, they all go “on” or “off” together.

It works so quickly that I think I bugged out Home Assistant. For instance, I tried enabling a motion sensor when this automation disabled them:

The toggle gets turned back so fast that it remains in the “Off” state, but the graphic is still in the “On” position.

didnt test this before, but now reading your post, I can confirm


group:
  kiosk_mode_hide_dialog_header:
    name: Kiosk mode hide dialog header
    entities:
      - input_boolean.hide_dialog_header_history
      - input_boolean.hide_dialog_header_settings
      - input_boolean.hide_dialog_header_overflow
    all: true

to be fully functional in 2024.6.3, which can be observed easily when you do this



There have been other reports of grouped entities (device_trackers) not working correctly, but there is a fix coming in for that.

doesnt take away from hoping the input_boolean group will at some point be added to the helpers UI for grouped entities…

1 Like