How to use GUI to create a new group?

I have created a set of ‘person’ entities, each with a ‘device_tracker’
I would now like to create a group of all of these people -eg; family
How do I use the GUI to create this group?

I can see configs for editing the YAML but I am trying to keep using the GUI.
Sorry to be dumb but I can not find a way to create a new group with GUI

2 Likes

You can’t find it, because it doesn’t exist :wink:

Thanks.

configuration.yaml it is then :slight_smile:

If you have a default config you can edit the groups.yaml file that can be reloaded without restarting home assistant.

To edit files from within home assistant (when using hassio) you can install the Configurator addon.

Hey Tinkerer, thanks for your hard work!

What’s the explanation here? Is it planned?

I’ve been trying to stick to the UI (being a believer in simplicity) and it’s been a supreme struggle. Now that I’m using Nabu Casa, neither Alexa nor Google support Areas. So it seems in order to create useful functions like “Alexa, turn off the Kitchen lights” I need a specific group since my Kitchen area isn’t something I can trigger.

No idea. I don’t track all the architecture issues, core issues, pull requests, or developer chatter :wink:

It existed briefly once, a long long time ago, but was removed. I’m sure when somebody wants it badly enough to develop that functionality it’ll reappear.

Well, I understand that’s an Alexa limitation. Google supports rooms, which don’t map to areas either, so you can at least put entities in rooms in Google Assistant, and then control them that way.

You might consider a group light instead of a group of lights.

So let’s hope someone with the technical knowledge will bring this functionality into the UI.

Fingers crossed :crossed_fingers:

1 Like

I don’t really understand why you cant.

You create groups when you first start to configure HA. Why cant I add more later?

Also, how to you add entities without unique id to the existing groups you created on config?

I understand you can add entities to the groups.yaml. But what if there is an already existing group with that name. Will it break it, add a duplicate. LOL im not willing to test it.

Hi all
Also, the different use cases for “groups” and “light groups” is to me to confusing.

Two questions

  1. Can someone in this thread type out the exact code for “lights: !include lights.yaml” referencing lights from the configuration.yaml to another yaml-file?
  2. The exact code for creating a group, both with lights and switches, and with only lights… How is this written?

Any help would me appriciated. And yes, I have googled and tried to understand the Help Docs.
Peace :dove:

Have this in your configuration.yaml file:

light: !include lights.yaml

Then create a file in the \config directory called lights.yaml to have all the lights you want to configure. In that file you DO NOT use the light: heading at all. ie: when you see examples in the docs (example), leave out the light: line.

Both types of groups (a mix of lights and switches etc, or just lights) are exactly the same.

group:
  lights_off_when_away:
    name: Lights off when away
    entities:
      - light.alfresco_spotlight
      - light.arcade_table_leds
      - light.back_garden_spotlights_1
      - light.bedroom_lamp
      - light.couch_light
      - light.dining_lights

Similarly to using the light: !include lights.yaml in your configuratino.yaml file, you can use group: !include groups.yaml and then put the above group in a file called groups.yaml. Again, leave out the header group: so it becomes:

lights_off_when_away:
  name: Lights off when away
  entities:
    - light.alfresco_spotlight
    - light.arcade_table_leds
    - light.back_garden_spotlights_1
    - light.bedroom_lamp
    - light.couch_light
    - light.dining_lights
2 Likes

Thanks Dave!
I now have groups that looks like this
file name light-groups.yaml

# Light Group
- platform: group
  name: "Lampor i TV-rummet"
  entities:
    - light.tvrum_fonster_ho
    - light.tvrum_fonster_va

A. Could I give this group a more “code friendly” name? In what way? (ie. “light.group_tvroom”)
B. I have a switch with only ONE button. It’s a zigbee Aqara. I want to toggle the group I made with this button, but I cant find the created light group (above mentioned) as an entity in Automations to actually toggle…

In dev-tools there is no record of this button.
Most likely because the button doesnt set “on/off” in some way…
I have read that I could use some sort of “helper” to create a binary sensor that gets an action from the button when pressed, but I dont really know how to implement this.

All help appreciated
Peace :dove:

Edit
Found the answer myself. It’s all in the code beneath
“light.bedroom_windowlights” is a light group in my light-groups.yaml file <<–

alias: 'The button - One click'
description: Toggle the bedroom lights
trigger:
  - device_id: 1efb04368a7f0f503c786b9c7ccf9d56
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - service: light.toggle
    target:
      entity_id: light.bedroom_windowlights
    data:
      transition: 1
      brightness_pct: 62
mode: single

This helped me as well. Thanks

I must admit that I’m quite surprised this still isn’t a available to edit in the GUI. Not that its a problem for me to go edit it in groups.yaml, but its just such a basic thing, that you would expect it to be a part of Home Assistant’s GUI by now

5 Likes

As someone who is now looking into groups, with the volume and complexity of other things that have been moved to the UI over yaml, I’m surprised as well.

Having said that, remember a lot of the developers of Home Assistant are still volunteers. And as Tinkerer pointed out: it will get looked at if/when it becomes a priority for one of the developers.

It could also be that doing so via the UI could be complex - IMO the UI part should be no different from say an Entities card in lovelace, but the backend of that - how it takes your UI entries and makes the group/s, especially without reloading/restarting Core - could be a problem.

For us looking at the front end, it seems simple; for the developers looking at the backend, it could be a major headache; especially given the sheer variety of entities that would need to be able to work with groups, and work correctly.

2 Likes

anyone know of any issues regarding groups have been opened? in github i mean

I did create the light group, but my problem is that you cant define an alias to them?
I dont like using scandinavian letters in light groups ÆØÅ so in HA I just give them a name to show in the UI using the correct native letters. But since the grouping is done in the YAML you cant do that

Or is alias supported in the YAML?

This is how I did mine:

- platform: group

  name: Kitchen

  entities:

    - light.island

    - light.kitchen_recessed_lights

    - light.kitchen_accent_lights

- platform: group

  name: Kitchen Accent Lights

  entities:

    - light.kitchen_island_leds

    - light.kitchen_leds

    - light.kitchen_over_cabinet_1_leds

    - light.kitchen_over_cabinet_2_leds

    - light.kitchen_under_cabinet_1_leds

    - light.kitchen_under_cabinet_2_leds

- platform: group

  name: Island

  entities:

    - light.kitchen_pendant_light_1

    - light.kitchen_pendant_light_2

    - light.kitchen_pendant_light_3

I did the same but then you get a group like this in HA:


And because you defined it in the YAML you cant rename the name to the right name?
I was hoping that some alias: Udendørs lys - would be an option but sofar no luck
My hope is that some day the grouping will move to the UI

that’s correct. my very first one was in yaml so I can’t edit it in the GUI. That’s pretty much a standard nuance everywhere you go in HA.