Hi there,
Upstairs I have a motion sensor which will turn on my lights in the hallway. I would like to have different brightnesses for different times. I something like, between sunset en 23:00 turn on the lights when movement is detected with brightness 200, an after 23:00 en before sunrise turn on the lights when movement is detected with brightness 5. But I can’t get it to work.
# Zet lamp hal boven aan bij beweging
- id: lights_on_motion_hall_upstairs_early
alias: Turn on the ligts when motion is detected in hall upstairs early
initial_state: True
hide_entity: False
trigger:
platform: state
entity_id: binary_sensor.bewegingssensor_hal_boven
from: 'off'
to: 'on'
condition:
- condition: time
before: '19:00:00'
- condition: sun
after: sunset
action:
- service: light.turn_on
data:
entity_id: light.hal_boven
brightness: 200
- id: lights_on_motion_hall_upstairs_late
alias: Turn on the ligts when motion is detected in hall upstairs late
initial_state: True
hide_entity: False
trigger:
platform: state
entity_id: binary_sensor.bewegingssensor_hal_boven
from: 'off'
to: 'on'
condition:
- condition: sun
before: sunrise
- condition: time
after: '19:00:00'
action:
- service: light.turn_on
data:
entity_id: light.hal_boven
brightness: 5