Need some help creating groups/views

I can’t figure out what I’m doing wrong. I’ve followed several tutorials but I can not get my groups to work. I either get an error or no error but no groups/views.

Using this code in my configuration.yaml file (notice the commented out “group: !include groups.yaml”)

group:
  automations:
  name: automations
  view: yes
  entities:
    - automation.alarm_trigger
    - automation.home_alarm_trigger_email_alert
    - automation.sounds_siren
    - automation.test_device_tracker
    - automation.test_mqtt_to_android
    - automation.tts_for_alarm_disarmed
    - automation.tts_for_arming_alarm
    - automation.turn_off_siren
    - automation.wemo_mini_plug_off
    - automation.wemo_mini_plug_on

  garage:
  name: garage
  view: yes
  entities:
    - cover.garage_door_opener
    - zwave.ecolink_doorwindow_sensor

#group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

I don’t get any groups or views on the home page at http://localhost.hassio:8123/states but the entities listed in those groups are no longer on the home page.

If I uncomment the “group: !include groups.yaml” in the configuration.yaml file, then put that same code in the groups.yaml file I get this error:

Configuration invalid
Invalid config for [group]: [automations] is an invalid option for [group]. Check: group->group->group->automations. (See /config/configuration.yaml, line 147). Please check the docs at Group - Home Assistant

My configuration.yaml file with line numbers:

146
147
148   group: !include groups.yaml
149   automation: !include automations.yaml
150   script: !include scripts.yaml

Groups.yaml file:

group:
  automations:
  name: automations
  view: yes
  entities:
    - automation.alarm_trigger
    - automation.home_alarm_trigger_email_alert
    - automation.sounds_siren
    - automation.test_device_tracker
    - automation.test_mqtt_to_android
    - automation.tts_for_alarm_disarmed
    - automation.tts_for_arming_alarm
    - automation.turn_off_siren
    - automation.wemo_mini_plug_off
    - automation.wemo_mini_plug_on

  garage:
  name: garage
  view: yes
  entities:
    - cover.garage_door_opener
    - zwave.ecolink_doorwindow_sensor

Any idea what I’m doing wrong?

there is 2 different type of group to be seen on frontend.

First type is the group as a card. This contatins individual entity_id to be inside one group card.
example below will give you the group card to be seen in entity_id as “group.automations” and “group.garage”

group:
  automations:
  name: automations
  entities:
    - automation.alarm_trigger
    - automation.home_alarm_trigger_email_alert
    - automation.sounds_siren
    - automation.test_device_tracker
    - automation.test_mqtt_to_android

  garage:
  name: garage
  entities:
    - cover.garage_door_opener
    - zwave.ecolink_doorwindow_sensor

Second type is the group as to be seen on frontend as view tab. This combine many group you created from first type of group to be seen inside view tab.
example below will give you the group of tab view name “mix” to be seen on frontend, contain 2 groups inside.

group:
  mix:
  name: mix
  view: yes  # with view: yes will be shown as tab view. without view: yes will be as a group card.
  entities:
    - group.automations
    - group.garage

your indenting is wrong.

try:

group:
  automations:
    name: automations
    view: yes
    entities:
      - automation.alarm_trigger
      - automation.home_alarm_trigger_email_alert
      - automation.sounds_siren
      - automation.test_device_tracker
      - automation.test_mqtt_to_android
      - automation.tts_for_alarm_disarmed
      - automation.tts_for_arming_alarm
      - automation.turn_off_siren
      - automation.wemo_mini_plug_off
      - automation.wemo_mini_plug_on

  garage:
    name: garage
    view: yes
    entities:
      - cover.garage_door_opener
      - zwave.ecolink_doorwindow_sensor

That should give you two more “tabs” at the top of the screen in the blue bar. one will contain the first set of entities the next will contain the other two.

I also think that since you defined the groups as “view: yes” then you need to also define a default view. I’m not entirely sure about that tho. try it without defining it and see if it works. If not then define one.

Also if you are using the groups.yaml with an include you need to remove the first line that says groups that line is being pulled from configuration.yaml

3 Likes

Thanks so much! I was struggling with groups