I created this to mimic friendship lamp behavior. Basically two lights that are connected, so changes to one adjust the state of the other. I haven't worked out a debounce yet, and there is a quirk when I implement that one light doesn't adjust temperature with the other (only RGB).
Δ LIGHT A → LIGHT B
Δ LIGHT B → LIGHT A
Find/replace ENTITY_ID_OF_LIGHT_A and ENTITY_ID_OF_LIGHT_B with your respective light entities and you're off. The automation fires off a script each time a change is registered. P.S. I haven't workeed on this in a year.
https://github.com/31415pi/HomeAssistant_stuff/tree/main/Friendship_lamps