|
发表于 2020-9-11 23:41:19
|
显示全部楼层
sensor:
- platform: template
sensors:
rgb:
friendly_name: 'light color'
value_template: "{{ state_attr('light.yeelight_strip2_04cf8c75042d','rgb_color') }}"
binary_sensor:
- platform: template
sensors:
red:
friendly_name: "户主指纹开锁"
value_template: "{{ state_attr('light.yeelight_strip2_04cf8c75042d','rgb_color') == (255,0,1) }}"
green:
friendly_name: "女主人指纹开锁"
value_template: "{{ state_attr('light.yeelight_strip2_04cf8c75042d','rgb_color') == (0,255,6) }}"
我按这个方式设置的,hass里面的状态不会随我上面设置的色彩同步更新
始终显示“关闭” |
|