Groups and Text vs GUI Configuration

I’ve been doing a lot of reading, and trying to find out the some of the concepts around groups in Home Assistant. As i build my system i’m trying to keep everything relatively organised. What i’m finding is that a lot of the documentation appears to be for older versions and some components are deprecated or don’t exist.

Before i switched to Home Assistant from Openhab, i was able to easily tag items etc into groups. Now i know there are light groups etc… in Home Assistant, but where should they be configured? I thought it might be a good idea to move things out into groups.yaml to keep things organised, but that doesn’t seem to work for light groups.

Should i be using the Groups.yaml?
Should everything be in Configuration.yaml?

Sooo confused.

Currently Running HASSOS
with version Home Assistant 0.114.4

Light groups are light entities not group entities - if you look at the docs you’ll see this by the domain specified:

light:
  - platform: group
    name: Kitchen Lights

That first line, that’s the domain, light, and in light it uses the group platform.

So, you add these to wherever your other lights are defined, as explained in here.

I guess, my question was more about best practice and trying to keep things organised. Is their any benefit to keeping thigs like groups in a separate yaml?

I tried configuring light groups in groups.yaml, but couldn’t seem to get it to work.

This is my yaml atm, and i can just see it getting out of control and all over the place.

default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

# Example configuration.yaml entry
media_player:
  - platform: yamaha
    host: ###.###.###.###
mqtt:
  broker: ###.###.###.###
light:
  - platform: group
    name: Office Lights
    entities:
    - light.study_reading_lamp
    - light.study_uplight
  - platform: group
    name: Middle Floor Lights
    entities:
    - light.lounge_reading_lamp 
    - light.lounge_tv_left
    - light.lounge_uplight 
    - light.loungeroom_tablelamp
    - light.tv_pelmet_strip 
    - light.cabinet_uplight
    - light.kitchen_downlight
    - light.arlecrgbw

Because that’s part of group: - and light groups are part of light (see the docs.

How you break it up is entirely up to you, but you want to read:

This is my config, and as you’ll see I use a range of include options for splitting it up. Others use packages. Some mix both.

1 Like