Hi all,
Before buying some more expensive color bulbs, I was wondering if this is possible via an automation in HA:
Can the color change on one light / bulb trigger the same color change on another light / bulb?
Big thank you in advance.
Hi all,
Before buying some more expensive color bulbs, I was wondering if this is possible via an automation in HA:
Can the color change on one light / bulb trigger the same color change on another light / bulb?
Big thank you in advance.
Yes, two methods
alias: Follow other lamp
description: ''
trigger:
- platform: state
entity_id: light.bulb1
condition: []
action:
- service: light.turn_on
data:
brightness: '{{ states.light.bulb1.attributes.brightness }}'
color_temp: '{{ states.light.bulb1.attributes.color_temp }}'
target:
entity_id: light.bulb2
mode: single
do you mean bulb1 here?
Definitely yes, I think it has just been a typoâŚ
I guess it depends - you may want to leave bulb2 at itâs current brightness and just change the colour, or you may want to mirror the colour and the brightness
Yes, a typo when I changed from my long entity names to make it readable
Wow that is awesome thank you so much !
I cannot try it right now, but now I am going to buy them and then test all of this.
So 4th line form the botton if I understood it right, needs to be bulb1 instead of 2 ⌠so far I am a beginner and did all the automations via gui not yaml, but will definitely dive into this, too.
Yes both would the target in my case, but both might be valid cases of course
Correct, I just edited the post to be correct.
If you cut/paste this into a âblank automationâ in YAML mode, and go back to âGUIâ mode, then it will show as GUI and you can see which attributes it sets.
There are other attributes, which can be âcopiedâ using the same metod.
@khvej8
omg it works amazing!
thank you so much
I do not have the color ones yet, but tested already with brighteness, awesome
In the gui it still shows me yaml (for the actions), it says âVisual editor is not supported for this configurationâ ⌠but that is still fine, I anyway wanted to get more familiar with yaml.
(backround of this is I am using two bridges, a hue bridge with (almost) all lights (and some hue accessoires), as my wife really uses the hue app and alexa etc., and a sonoff bridge for all the rest, switches, sensors, sockets etc. to have all the flexibility for all kinds of devices.
And to also have a good zigbee mesh for the non-hue devices, I have some lamps in central positions with 4, 3 or 2 GU10s and I connect one of the bulps to the sonoff to have the repeater functionality. And simply let this one follow the hue ones. For on / off it was easy, but now it also works for dimming and color, so great )
One fun fact I might need to dig in: At 1% dimming in hue app, the following bulp gets off already. If I do 1% in the HA app, the following bulp does not turn off, and follows correctly to 1%. All other values work perfectly identical
Edit2:
Although it works great, I have these errors and warnings in the log - should I just ignore them, or try to do something about them?
Error while executing automation automation.link_light_corridor_mid_hue_to_non_hue_follow: expected int for dictionary value @ data[âbrightnessâ]
Error executing script. Invalid data for call_service at pos 1: expected int for dictionary value @ data[âbrightnessâ]