I want to have an automation for an ikea five button remote that changes the dimmness of the lamp(s) that are on. It could be one or both lamps that are on. And if one lamp is on I dont’ want to turn the other on with the light.turn_on service.
I’d also like to avoid doing a bunch of conditionals because that is difficult to maintain.
So I know that you can do this in lovelace with auto-entities, but I havent seen anything for this in automations… It would be nice to see what you turn up with in the end!
We only use the ‘corner’ lamp for extra brightness and is usually off. So we want the remote to control the left and right lamp only.
I expect the template to return the which lamp (left and/or right) is currently on. (I edited my original post to correct off to on)
I expect the rejectattr to reject the corner lamp out of the group that starts with light.living_room_lamp
In your first question, you said that the call will fail if the result is an empty list. In all the cases for the remote, this will be used for, if the list is empty then nothing should happen.
For example: if user presses the brightness down button when no lights are on, then the list would be empty. This is an okay scenario.