Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
788 B
542
Indexable
Never
alias: presence light
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.kitchen_presence_ld1115h_occupancy_or_movement
    to: "on"
    id: detected
  - platform: state
    entity_id:
      - binary_sensor.kitchen_presence_ld1115h_occupancy_or_movement
    to: "off"
    id: clear
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: detected
        sequence:
          - service: light.turn_on
            data: {}
            target:
              entity_id: light.loft_bulb_far
      - conditions:
          - condition: trigger
            id: clear
        sequence:
          - service: light.turn_off
            data: {}
            target:
              entity_id: light.loft_bulb_far
mode: single