I’m having trouble to get the automation below working:
Condition light: ON
State Motion Sensor: ON to OFF
Between (after) 23:00:00 and (before) 06:30:00 Dimmable Light should Turn off (state Motion Sensor ON -> OFF).
For everything in between (when Light is ON) the light should be dimming to 50%.
The is issue that between 23:00 and 06:30 the light doesn’t go off, but always dims to 50%.
I know this can be done different ways and I guess much easier (ideas are welcome! ) but in the case below using
choose:
I can’t get it to work.
Thanks for help and ideas.
- alias: 'Motion Sensor - off (1min)'
trigger:
platform: state
entity_id: binary_sensor.tms_gang
from: 'on'
to: 'off'
condition:
condition: state
entity_id: light.dimmable_light_1
state: "on"
# mode: single
action:
- choose: #if
- conditions:
- condition: time
after: '23:00:00'
- condition: time
before: '06:30:00'
sequence:
- service: light.turn_off
entity_id: light.dimmable_light_1
default: #else
- service: light.turn_on
entity_id: light.dimmable_light_1
data:
brightness_pct: 50
transition: 4