mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
alias: Front Porch Lights
|
||||
id: automation_front_porch_lights
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: motion_on
|
||||
entity_id:
|
||||
- binary_sensor.front_porch_motion
|
||||
- binary_sensor.front_porch_person_occupancy
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: motion_off
|
||||
entity_id: binary_sensor.front_porch_motion, binary_sensor.front_porch_person_occupancy
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 1
|
||||
|
||||
- platform: state
|
||||
id: door_open
|
||||
entity_id: binary_sensor.outer_garage_door, binary_sensor.garage_door
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: door_shut
|
||||
entity_id: binary_sensor.outer_garage_door
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 1
|
||||
|
||||
- platform: state
|
||||
id: too_dark
|
||||
entity_id: binary_sensor.front_porch_naturally_lit
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
id: too_bright
|
||||
entity_id: binary_sensor.front_porch_naturally_lit
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- alias: "Front porch not naturally lit"
|
||||
condition: state
|
||||
entity_id: binary_sensor.front_porch_naturally_lit
|
||||
state: 'off'
|
||||
|
||||
- alias: "Light is already on"
|
||||
condition: state
|
||||
entity_id: light.front_porch_overhead
|
||||
state: 'on'
|
||||
|
||||
- alias: "It is not late evening"
|
||||
condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: 'off'
|
||||
|
||||
- alias: "It is not night"
|
||||
condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: "door_open"
|
||||
|
||||
- condition: state
|
||||
entity_id: light.front_porch_overhead
|
||||
state: 'off'
|
||||
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.front_porch_overhead
|
||||
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: "motion_on"
|
||||
|
||||
- condition: state
|
||||
entity_id: light.front_porch_overhead
|
||||
state: 'off'
|
||||
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.front_porch_overhead
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_porch_motion
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 1
|
||||
|
||||
- condition: state
|
||||
entity_id: binary_sensor.outer_garage_door
|
||||
state: 'off'
|
||||
|
||||
- condition: state
|
||||
entity_id: light.front_porch_overhead
|
||||
state: 'on'
|
||||
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.front_porch_overhead
|
||||
Reference in New Issue
Block a user