本帖最后由 liuyr 于 2017-7-5 17:24 编辑
谢谢分享!没有设置阅读权限太好了
但是这部分代码过不去,请大神们看一看怎么修正代码:
automation中添加:
action:
- service: light.turn_on
data_template:
entity_id: light.gateway_light_xxxxxxxxx<font face="Arial">(灯的<span style="color: rgb(0, 0, 0); background-color: rgb(250, 250, 250);">Entity)</span></font>
rgb_color: ['{{ states.input_slider.r.state | int }}','{{ states.input_slider.g.state | int }}','{{ states.input_slider.b.state | int }}']
brightness: '{{ states.input_slider.brightness.state | int }}'
- service: light.turn_off
data_template:
brightness: '{{ states.input_slider.brightness.state == 0 }}'
|