Adjust the brightness of a group of lights while maintaining the relative brightness between individual lights!
When adjusting the brightness of a group using the built-in light group, all the lights within the group would end up getting the same level no matter their previous level. I took a stab trying to fix that once before, but using a template light made it hard to maintain and it hurt reusability.
Now with the power of a custom component that’s built on top of the core light group, it’s as easy as adding just a few lines to your configuration.yaml file
Then search for Relative brightness light group to find and install it. Set up any lights you wish in your configuration file and restart Home Assistant if necessary.
Manually
Head over to the repository at GitHub, click the Code button and download the files either as a ZIP-file or using git.
From the downloaded files, move the folder that’s inside the custom_components folder into the custom_components folder in your HA config folder.
Restart Home Assistant
Configuration
To use, simply add this to your configuration.yaml file:
Note: Since I changed from using the IKEA Tradfri hub to the Philips Hue bridge, my brightness sliders started showing this “bouncy” behavior where it takes a second before all sliders are in the right place.
However, as far as I can tell this isn’t a problem introduced with my component ('ve seen the same happen with the core light group) so instead there’s something that needs fixing way beyond this component. Fingers crossed that it works better with your setup than in mine
Nice! Actually I have been waiting for this for a very long time. I will test this as soon as possible. Before, I achieved this using scripts and helpers, which was getting annoying to mantain as soon as the number of lights grew.
This is not a card for the dashboard but instead a way to create a new light entity.
Once you’ve gotten the files needed into your Home Assistant (either by downloading them or using HACS as mentioned in the first post), then you can add the code you quoted into your configuration.yaml file.
When that is done you can use any card for your dashboard that supports lights, for example the light card or tile, and then reference a new light.the_office that’s been created for you.
However, if you want the same look and feel as in the card I’ve done above, you’ll first need lovelace-slider-entity-row and then you can add a manual card with this YAML to your dashboard:
Hi Oscar,
I found out, that the manual adding in HACS gives an error, it says: there is a shop entry (or similar) i than searched in HACS and added your system, than the small sample was there, but there was no difference to a groug (still saw this one round slider around a lightbulb). I‘ll just try your suggestion and givea notice, if it worled.
Many thanks
Juergen
which turn on both lights with the main switch and the “rechts” light with the correct one, the long slider without a name is the one for the “links”, the on/off on top makes both lamps on and off, the “links” has no on/off. So it works “somehow”, but not as expected. I have absolutely no idea, where to search. I did install “relativ-brightness-light-geoup” and “slider-entity-row” thru the HACS Shop today so I think it should be the newest version.
The difference from your current setup to mine is that in my card I have included three lights:
The first one, the one with the full width, is the group one, the light.the_office for the whole office
The second and third one, not full width, are the individual lights in my office, the desk lamp (light.office_desk) and spotlights (light.office_spotlights) respectively.
So then when I change the brightness on the the first one the other two on the card will change too but in a way so that their “relative brightness” to each other is somewhat maintained.
So make sure to add your light.gartenlampen to your card as the first one. If no light.gartenlampen shows up that you can control, you might have to restart HA.