Template group visibility

trying to implement this:

https://www.home-assistant.io/docs/configuration/group_visibility/

we read about the data_template containing templates for both entity_id and visibility set through a dedicated script. Which makes things even more complicated than the automation I currently use…

- alias: 'No dev tools at startup HA'
  id: 'No dev tools at startup HA'
  initial_state: 'on'
  trigger:
    platform: homeassistant
    event: start
  condition:
  action:
    - delay: '00:00:15'
    - condition: state
      entity_id: binary_sensor.mode_developer
      state: 'off'
    - service: group.set_visibility
      entity_id: group.developer
      data:
        visible: False
    - service: group.set_visibility
      entity_id: group.developer_links
      data:
        visible: False
#    - delay: '00:00:05'
#    - service: script.mode_normal_direct
#    - delay: '00:00:03'
#    - service: script.opstart_direct
    - condition: state
      entity_id: input_boolean.notify_developing
      state: 'on'
    - service: notify.notify
      data:
        message: >
          Dev mode - Dev mode visibility set to false at setup

would have hoped for this possibility:

- alias: 'No dev tools at startup HA'
  id: 'No dev tools at startup HA'
  initial_state: 'on'
  trigger:
    platform: homeassistant
    event: start
  condition:
  action:
    - delay: '00:00:15'
#    - condition: state
#      entity_id: binary_sensor.mode_developer
#      state: 'off'
    - service: group.set_visibility
      entity_id: group.developer
      data_template:
        visible: {{ is_state('input_select.mode', 'Developer') }}
    - service: group.set_visibility
      entity_id: group.developer_links
      data_template:
        visible: {{ is_state('input_select.mode', 'Developer') }}
#    - delay: '00:00:05'
#    - service: script.mode_normal_direct
#    - delay: '00:00:03'
#    - service: script.opstart_direct
    - condition: state
      entity_id: input_boolean.notify_developing
      state: 'on'
    - service: notify.notify
      data_template:
        message: >
          Dev mode - Dev mode visibility set to {{ is_state('input_select.mode', 'Developer') }} at setup

Any thoughts if that is anywhere near correct? If not, we might need a feature request…

Cheers,
Marius

nevermind, as always, the devil is in the details, parenthesis in this case…

compressed it a bit further:

- alias: 'Set Dev tools at startup HA'
  id: 'Set Dev tools at startup HA'
  initial_state: 'on'
  trigger:
    platform: homeassistant
    event: start
  condition:
  action:
    - delay: '00:00:05'
    - service: group.set_visibility
      entity_id: 
        - group.developer
        - group.developer_links
      data_template:
        visible: "{{ is_state('input_select.mode', 'Developer') }}"
    - condition: state
      entity_id: input_boolean.notify_developing
      state: 'on'
    - service: notify.notify
      data_template:
        message: >
          Dev mode - Dev mode visibility set to {{ is_state('input_select.mode', 'Developer') }} at setup
1 Like