mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
alias: Driveway Lights
|
|
id: automation_driveway_lights
|
|
mode: queued
|
|
|
|
trigger:
|
|
- platform: state
|
|
id: motion_on
|
|
entity_id:
|
|
- binary_sensor.from_street_vehicle_occupancy
|
|
- binary_sensor.driveway_person_occupancy
|
|
- binary_sensor.front_yard_person_occupancy
|
|
- binary_sensor.garage_door
|
|
from: "off"
|
|
to: "on"
|
|
|
|
- platform: state
|
|
id: motion_off
|
|
entity_id:
|
|
- binary_sensor.from_street_vehicle_occupancy
|
|
- binary_sensor.driveway_person_occupancy
|
|
- binary_sensor.front_yard_person_occupancy
|
|
- binary_sensor.garage_door
|
|
from: "on"
|
|
to: "off"
|
|
for: "00:05:00"
|
|
|
|
- platform: state
|
|
id: got_bright
|
|
entity_id: binary_sensor.is_dark
|
|
to: "on"
|
|
|
|
- platform: state
|
|
id: got_dark
|
|
entity_id: binary_sensor.is_dark
|
|
to: "off"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: "motion_on"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
alias: "It is dark outside"
|
|
entity_id: binary_sensor.is_dark
|
|
state: "on"
|
|
- condition: state
|
|
alias: "Front porch light is on"
|
|
entity_id: light.front_porch_overhead
|
|
state: "on"
|
|
- condition: state
|
|
entity_id: light.driveway
|
|
state: "off"
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.driveway
|
|
- conditions:
|
|
- condition: trigger
|
|
id: "motion_off"
|
|
- condition: state
|
|
entity_id: light.driveway
|
|
state: "on"
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.driveway
|