I have developed a script to perform similar actions for lights based on an area and label. Thank to some help on this:Expand Template with both Area and Label I was able to get this working.
However, my next stage is to prevent lights turning off when the lights are dimmed to much. ie; I want to set a minimum brightness of 1% to prevent the lights turning off. Ideally they would also be set to the same level.
Push dim down button and all lights in the bedroom that are on, and are greater than 1% are dimmed by the set amount.
I don’t see how you can do this in just one action. I would make this with two actions, where the first filters out all lights below a certain threshold and sets those to the minimum brightness, then a second action for any lights above it. Something like this…
Thanks, this is great. Sometimes the lights dim a bit out of sync, but its the best i can get at this stage. Eventually i will get to dynamic groups based on labels.
But for now this achieves what i need, and while it duplicates some of the light.turn_on action that is OOTB, it enables a consistent experience across all the dimmer switches with minimal management.
The only issue i came across was the dim-down being a negative number meant that it would always dim all lights. So i just multiplied by -1.