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