Goal 1 - 30 minutes after sunset i would like the light to come on at 25% brightness. The light should stay on until 23:00.
Goal 2 - additionally i would like to trigger the light to reach 100% brightness when a Hue PIR detects motion. The light should remain on for 15 seconds then return to the previous state as per the conditions in goal 1.
automation:
-
id: outdoor_light_sunset
alias: "Outdoor Light - Sunset to 23:00"
trigger:- platform: sun
event: sunset
offset: "+00:30:00"
condition: []
action: - service: light.turn_on
target:
entity_id: light.extended_color_light_1
data:
brightness_pct: 25
mode: single
- platform: sun
-
id: outdoor_light_off_2300
alias: "Outdoor Light - Turn Off at 23:00"
trigger:- platform: time
at: "23:00:00"
condition: []
action: - service: light.turn_off
target:
entity_id: light.extended_color_light_1
mode: single
- platform: time
-
id: outdoor_light_motion_trigger
alias: "Outdoor Light - Motion Trigger"
trigger:- platform: state
entity_id: binary_sensor.hue_outdoor_motion_sensor_1_motion
to: "on"
condition: []
action: - choose:
- conditions:
- condition: time
before: "23:00:00"
after: "sunset"
sequence: - service: light.turn_on
target:
entity_id: light.extended_color_light_1
data:
brightness_pct: 100 - delay: "00:00:15"
- service: light.turn_on
target:
entity_id: light.extended_color_light_1
data:
brightness_pct: 25
default:
- condition: time
- service: light.turn_off
target:
entity_id: light.extended_color_light_1
mode: single
- conditions:
- platform: state