Untitled

 avatar
unknown
plain_text
2 years ago
1.5 kB
1201
Indexable
alias: Bulb Brightness
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.office_motion
    to: "on"
    id: Detected
  - platform: state
    entity_id:
      - binary_sensor.office_motion
    to: "off"
    id: Clear
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Detected
        sequence:
          - repeat:
              until:
                - condition: state
                  entity_id: sensor.office_light_brightness
                  state: "255"
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step_pct: -1
                  target:
                    entity_id: light.loft_bulb_far
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 1
                    milliseconds: 0
      - conditions:
          - condition: trigger
            id: Clear
        sequence:
          - repeat:
              until:
                - condition: state
                  entity_id: light.loft_bulb_far
                  state: "off"
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step_pct: -1
                  target:
                    entity_id: light.loft_bulb_far
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 250
mode: single
Editor is loading...