Automation: Setting Brightness Level

Very interesting indeed! I was wondering how that was done. I had created a Group for them but then later found out it could not be integrated in Automations. It doesn’t show up anywhere.

Checking the link, it looks like I did it the right way. From my configuration.yaml file I have:

- platform: group
    name: Livingroom OH Lights Gp
    entities:
      - light.eaton_halo_rl5601_dd07af02_level_light_color_on_off
      - light.eaton_halo_rl5601_6439a603_level_light_color_on_off
      - light.eaton_halo_rl5601_37608d03_level_light_color_on_off

Groups can be used in automations. Don’t judge what can or cannot be done based on what the Automation Editor does (it has limitations).

The group you created is a traditional group (not a Light Group) so the only thing you can do with it is turn its members on or off (you can’t use it to set a member’s brightness, color, etc).

It probably would have been wise to post the entire code block, which I didn’t. I do have brightness and color temperature control on both the ones in the living room and above the workbench in the garage. So I guess I DID do it correctly. Just not sure why they don’t show up in Automations. Then again, I had to manually enter my timers as well, because they didn’t show up either.

light:
  - platform: group
    name: Workbench Lights Gp
    entities:
      - light.eaton_halo_rl5601_0a6ecf01_level_light_color_on_off
      - light.eaton_halo_rl5601_5089cf01_level_light_color_on_off

  - platform: group
    name: Livingroom OH Lights Gp
    entities:
      - light.eaton_halo_rl5601_dd07af02_level_light_color_on_off
      - light.eaton_halo_rl5601_6439a603_level_light_color_on_off
      - light.eaton_halo_rl5601_37608d03_level_light_color_on_off

Yes, you are correct and I was mistaken; you did define the Light Groups correctly. The resulting two entities should appear as light.workbench_lights_gp and light.livingroom_oh_lights_gp.

BTW, anything you add to configuration.yaml requires either reloading (see Configuration> Server Controls > Reload) or restarting Home Assistant before it appears as an available entity.

I do see the Entities when looking directly at Entities, but just not in Automation. I will look again. I have been at this for many hours. My eyes are tired. Also been playing with a new/used (new to me) Netgear R7800 router which arrived today. Flashed DDWRT on it immediately. This will eventually be my IoT WAP.

I am realizing as my configuration.yaml file grows, the need to move some of this stuff into it’s own file, such as the groups.yaml file. I am also finding yaml’s strict indention policies very frustrating as well. It took me nearly two hours to create an “Evening Lights” group because I kept failing at the indention. I was unable to create this as a pure light group as I also have included one X10 device, and some TPLink switches/outlets as well. A light group would not accept those devices so I had to make it a standard group. I only need on/off for these anyway. So this was my first entry in my groups.yaml file.

group:
   name: "Evening Lights"
   entities:
    - light.sengled_e11_n13_ba360d00_level_on_off   #Breezeway light 20%
    - switch.cafe_lights_power                      #Front Porch Cafe Lighting
    - light.yee_left_lamp                           #Livingroom Left Lamp
    - light.backyard_light                          #Backyard light X10
    - switch.family_room                            #TPLink Outlet Lamp
    - light.philips_lwb014_62b94e03_level_on_off    #Master Bedroom Lamp 18%

…and finally got it working and imported into HABridge for Alexa voice control. Also set to trigger with Sunset and auto off at 11:00pm. I think I can possibly simplify this once I get into the Blueprints.

Edit: I have NOT been able to move my light groups into this file. Perhaps they are not supported in the groups.yaml file.

Correct. If you have a groups.yaml file the only thing it’s meant to contain are configurations for the group domain. A Light Group is part of the light domain so it cannot reside within a file dedicated to the group domain.

If you are creating anything in YAML, it helps if your text editor is “YAML aware”. That means it understands how YAML indentation works (press the Tab key and it will indent with two spaces instead of using an actual tab character) and can even flag indentation errors.

A good combination is VS Code with the Home Assistant Config Helper plugin. In fact, it’s available as an Add-on (but I would not advise using the Add-on version if you are running Home Assistant on an RPI3 because I found it to be exceedingly slow and buggy).

Again, thank you for the valuable info. Did not know about the Tabs vs Spaces thing. That may make a huge difference!

I am using Kate to edit .yaml files under Fedora Linux v33. It seems to know YAML as well as many other languages. I was wondering why it kept replacing my tabs with spaces haha! Now I know!

I have never owned a Windows computer. I went straight from the Commodore Amiga 2000 to Redhat Linux 4.1 (not Enterprise) back in 1993 or 94. Never looked back and never paid a Microsoft license fee. :smiley:

FWIW, Microsoft Visual Studio Code is an open-source, multi-platform text editor. I use it primary on my Ubuntu ‘daily driver’ laptop and occasionally on a Windows PC (but usually just for Home Assistant purposes; I still use Notepad++ for general text editing on Windows … force of habit).

Thanks for the tip. I was not aware Microsoft had released this for multi-platform. Downloading the .rpm now. I will give it a try, but I really love my Kate lol.

I also use Notepad++ on my work Windows computer and as IT Manager/Engineer for a CBS/FOX affiliate television station(s), I have my share of windows experience. Which is one of the reasons I will never own it personally. Whoever came up with the idea of the Windows Registry should be fired! :smiley: