Hello,
I am trying to control yeelight color bulbs from home assistant and smartthings applications. Everything is clear from HA, but how to make these bulbs color and brightness to be controllable from Smartthings? I have created simulated rgb bulb in smartthings and trying to control via mqtt. I am gettings these parameters to HA when I am trying to change a color:
info: Incoming message from SmartThings: smartthings/test1/hue/state = 6
info: Incoming message from SmartThings: smartthings/test1/saturation/state = 79
info: Incoming message from SmartThings: smartthings/test1/color/state = #FF7E35
and from smartthings:
Forwarding device event to bridge: {"path":"/push","body":{"name":"test1","value":"#7F9BFF","type":"color"}}
d1f622de-fc6d-4845-ab6b-c5128b7aa63f 12:08:31 AM: debug Forwarding device event to bridge: {"path":"/push","body":{"name":"test1","value":"50","type":"saturation"}}
d1f622de-fc6d-4845-ab6b-c5128b7aa63f 12:08:31 AM: debug Forwarding device event to bridge: {"path":"/push","body":{"name":"test1","value":"63","type":"hue"}}
Yeelight accepts arguments in these formats:
rgb_color
Color for the light in RGB-format. [255, 100, 100]
color_name
A human readable color name. red
hs_color
Color for the light in hue/sat format. Hue is 0-360 and Sat is 0-100. [300, 70]
I have wrote an automation like this one, but it does not work:
- alias: Color selection RGB
trigger:
platform: mqtt
topic: "smartthings/test1/+/state"
action:
service: light.turn_on
data_template:
entity_id: light.yeelight_rgb_7811dcdc24c6
hs_color: '{[{value_json.hue},{value_json.saturation}]}'
What I am doing wrong?