Sync two dimmers to copy each other states

Hello I’m trying to sync two dimmers to copy each other states and brightness. I tried couple of solutions that i found on the web but non of them is working reliably either it does not work or it get stuck in the loop.

My requirements are following: i want light.dimmer1 when its turned on or off to turn on or off light.dimmer2, also when i change the brightness on one dimmer1 to change the brightness on dimmer 2, also i want to be able dimmer2 to control dimmer 1.

Does anybody managed to do this?

thanls

A bit different, but I have lights that get brighter at motion detect and lower after the detection is finished.
I use a template condition for this. You can read the current state of a light using state_attr, below I check if the current brightness is less than 50:

{{ state_attr('light.ikea_2700k_spot_001', 'brightness') | float < 50 }}

If so, I do a light.turn_on with the Service data: brightness: <value>

You can use templates as trigger, so I guess you should trigger on a brightness change and adjust the other light to the brightness you like.

I do have exactly the same requirement… was there any solution to this?

I’d suggest making an automation that triggers on any change of either one of the dimmers.
Then put in a condition that requires the two dimmers to not match in state and brightness. For example (in this case dimmable lights) a template condition:

{{ 
  states("light.dimmable_light_15") != states("light.dimmable_light_16")
  or
  state_attr("light.dimmable_light_15","brightness") != state_attr("light.dimmable_light_16","brightness")
}}

Then, if there is a mismatch one could do a choose on what should happen.
FYI, it is possible to use the template values to set brightness.

Since I don’t know your use case. Where possible i’d suggest having the actions done on a group that contains both entities. But I can imagin that your use case doesn’t suit this solution.

1 Like