I have a room with Hue lights, and a yeelight light strip, I’m trying to get the yeelight to match the hue when the switch on the wall changes the colour.
So I did a bunch of research on this, and it looks like it should be possible with an automation like this:
- alias: 'Sync Bedroom Dresser Colour'
trigger:
platform: template
value_template: "{{ states.light.master_bedroom.attributes.rgb_color }}"
action:
- service: light.turn_on
entity_id:
- light.masterbedroomdresser
data_template:
brightness: 255
transition: 10
rgb_color: [{{ states.light.master_bedroom.attributes.rgb_color}}]
However when I run this automation by hand I get the following error:
2018-09-22 19:33:45 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=rgb_color=(255, 234, 216), entity_id=['light.masterbedroomdresser'], brightness=255, transition=10, service=turn_on, domain=light>
2018-09-22 19:33:45 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data['rgb_color']. Got '(255, 234, 216)'
I have tried a number of ways to change those brackets into square brackets but no matter what I do HA always puts my variable inside a pair of brackets ()