#Increase brightness of a group of lights

1 messages · Page 1 of 1 (latest)

versed oracle
#

I have a bunch of Ikea bulbs in my bedroom, different models. They are all part of a group.

I also have an ikea tradfi switch there, which has brightness up / down buttons. I'd like to make those control the brightness of all the lights in the room.

However, when I create the automation, The Actions for Light are only Toogle, Turn off, Turn On, there is no "change brightness" action for lights.

When I try to add them as device I can't select the group of lights, only individual lights.

What kind of action would I use to increase the brightness of the lights, ideally slowly ramping up while I hold down the button?

Also, some lights might be off while I do that, they should stay off, but probably also have their brightness adjusted for when they next turn on, so all lights stay in sync.

The switch is an Ikea STYRBAR remote.

Ah, and once I have that I want the Opposite for the brightness down button, but that should then be easy.

runic lodge
#

Adjusting brightness of lights (either up or down) can be done with the light.turn_on action ("Light: Turn On" in the UI). One of the parameters it can take is brightness_step_pct ("Brightness Step" in the UI), which takes the percentage to adjust the light brightness by. So you can set it to e.g. 10 to increase the brightness percentage by 10 (so, from 80% to 90% for example), or -10 to decrease the brightness percentage by 10.

#

When selecting the lights to control, select them by "Entity", not by "Device".

#

Doing a smooth "adjust brightness while you hold the button" is unfortunately more difficult to handle. There is a special zigbee command for this, but I don't know of any way to send that command from home assistant.

#

An example of how to handle it is to make an automation which is triggered by both the "continuously pressed" and "released after long press" button events, and set the automation mode to "restart". Then, in the automation, check if the trigger was the "continuously pressed" event, and if so do a loop where you step the brightness up (or down) with a transition, then wait for the length of the transition.

#

When the button is released, home assistant will restart the automation for the new trigger, which will stop the loop.