yeelight ceiling light

이라이트 천장등은 normal과 moonlight 모드에서 따로 밝기 조절이 됩니다. 일반 모드에서 최저밝기로 해도 moonlight 보다는 훨씬 밝죠.
그래서 binary_sensor.ceiling_light_nightlight와 yeelight.set_mode서비스로 template스위치를 만들어 사용합니다.

light:
  - 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