Hello all,
Could someone lend me a hand with helping modify the below automation? I would like the all of the night lights to turn red if the garage door is open bt 7 pm and 4 am while somehow keeping the current “brains” of the below automation intact.
I would also like to have all of the lights go back to their standard actions as shown in the automation below once the garage door is closed.
Thank you all for any guidance you can give one this.
alias: Night Light Brains
description: ""
triggers:
- trigger: numeric_state
entity_id:
- sensor.master_bathroom_night_light_illuminance
below: 40
id: Master Bathroom Night Light Illuminance is below 40
- trigger: numeric_state
entity_id:
- sensor.living_room_night_light_illuminance
below: 40
id: Living Room Night Light Illuminance is below 40
- trigger: numeric_state
entity_id:
- sensor.den_night_light_illuminance
below: 40
id: Den Night Light Illuminance is below 40
- trigger: state
entity_id:
- binary_sensor.master_bedroom_night_light_occupancy
to: "on"
id: Master Bedroom Night Light Motion During Darkness
- trigger: sun
event: sunrise
offset: 0
id: Night Lights off at Sunrise
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Master Bathroom Night Light Illuminance is below 40
sequence:
- action: light.turn_on
metadata: {}
data:
kelvin: 5000
brightness_pct: 40
target:
entity_id: light.master_bathroom_night_light
- conditions:
- condition: trigger
id:
- Master Bedroom Night Light Motion During Darkness
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_pct: 40
kelvin: 5000
target:
entity_id: light.master_bedroom_night_light
- delay:
hours: 0
minutes: 0
seconds: 19
milliseconds: 0
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.master_bedroom_night_light
- conditions:
- condition: trigger
id:
- Den Night Light Illuminance is below 40
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_pct: 40
kelvin: 5000
target:
entity_id: light.den_night_light
- conditions:
- condition: trigger
id:
- Living Room Night Light Illuminance is below 40
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_pct: 40
kelvin: 5000
target:
entity_id: light.living_room_night_light
- conditions:
- condition: trigger
id:
- Night Lights off at Sunrise
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.night_lights
mode: single