그래서 binary_sensor.ceiling_light_nightlight와 yeelight.set_mode서비스로 template스위치를 만들어 사용합니다.
- platform: template
lights:
moonlight:
value_template: "{{ is_state('binary_sensor.ceiling_light_nightlight', 'on') }}"
turn_on:
service: yeelight.set_mode
data:
mode: moonlight
entity_id: light.ceiling_light
turn_off:
service: yeelight.set_mode
data:
mode: normal
entity_id: light.ceiling_light