#There's no light brightness transition in occupancy sensor automation

4 messages · Page 1 of 1 (latest)

lime crypt
#

Not sure why but the light doesn't fade on when someone walks in - but it does fade out at the end of the automation.

Here's my code:

description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.bathroom_motion_sensor_occupancy
    from: "off"
    to: "on"
condition: []
action:
  - if:
      - condition: time
        before: "05:30:00"
        after: "00:00:00"
        enabled: true
    then:
      - service: light.turn_on
        data:
          kelvin: 2475
          brightness_pct: 45
          transition: 2
        target:
          entity_id: light.bathroom_ceiling
    else:
      - if:
          - condition: time
            after: "05:30:00"
            before: "00:00:00"
        then:
          - service: light.turn_on
            target:
              entity_id: light.bathroom_ceiling
            data:
              kelvin: 2430
              brightness_pct: 80
              transition: 2
  - wait_for_trigger:
      - platform: state
        entity_id:
          - binary_sensor.bathroom_motion_sensor_occupancy
        from: "on"
        to: "off"
        for:
          hours: 0
          minutes: 0
          seconds: 15
  - service: light.turn_off
    metadata: {}
    data:
      transition: 2
    target:
      entity_id: light.bathroom_ceiling
mode: single
lime crypt
#

Not sure how I can mark this as solved 😅

hexed dust
#

Click the 3 dots at the top here (or right click the thread in the main channel) -> Edit Tags -> Check Resolved