Files
fresh-home/automations/rooms/front_porch_lights.yaml
T
CeeWeasel d60b56b37a Refactor camera cards to use advanced-camera-card format
- Updated garage-card.yaml to use vertical-stack and advanced-camera-card structure.
- Refactored indoor-camera-cycler.yaml to include multiple cameras in advanced-camera-card format.
- Modified kitchen-card.yaml to align with new advanced-camera-card structure.
- Consolidated master-bedroom-card.yaml to include both left and right cameras in a single advanced-camera-card.
- Removed deprecated master-bedroom-left-card.yaml and master-bedroom-right-card.yaml files.
- Updated nursery-card.yaml to follow the new advanced-camera-card format.
- Refactored outdoor-camera-cycler.yaml to utilize advanced-camera-card for multiple outdoor cameras.
- Cleaned up view-ha-floorplan.yaml by removing commented-out code.
- Updated view-overview.yaml to remove unused plant entities.
- Corrected media source paths in wake_up_the_master_bedroom.yaml and take_meds.yaml scripts.
- Added new ESPHome configurations for bed presence sensors.
- Updated full-sized floorplan SVG with new IDs for bed presence sensors.
2025-07-28 20:52:16 -04:00

155 lines
3.6 KiB
YAML

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
- binary_sensor.front_yard_person_occupancy
to: "on"
- platform: state
id: motion_off
entity_id:
- binary_sensor.front_porch_motion
- binary_sensor.front_porch_person_occupancy
- binary_sensor.front_yard_person_occupancy
to: "off"
for:
minutes: 5
- platform: state
id: door_open
entity_id:
- binary_sensor.garage_door
- binary_sensor.outer_garage_door_contact #, binary_sensor.outer_garage_door
to: "on"
- platform: state
id: door_shut
entity_id: binary_sensor.outer_garage_door_contact #, 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"
for:
seconds: 30
- platform: state
id: too_bright
entity_id: binary_sensor.front_porch_naturally_lit
to: "on"
for:
seconds: 30
action:
- choose:
- conditions:
- condition: trigger
id: "door_open"
- condition: state
entity_id: light.front_porch_overhead
state: 'off'
- 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'
- alias: "Front porch not naturally lit"
condition: state
entity_id: binary_sensor.front_porch_naturally_lit
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'
- alias: "Front porch not naturally lit"
condition: state
entity_id: binary_sensor.front_porch_naturally_lit
state: 'off'
sequence:
- service: light.turn_on
target:
entity_id: light.front_porch_overhead
- conditions:
- condition: trigger
id: "too_bright"
- condition: state
entity_id: light.front_porch_overhead
state: 'on'
sequence:
- service: light.turn_off
target:
entity_id: light.front_porch_overhead
- conditions:
- condition: trigger
id: "too_dark"
- condition: state
entity_id: light.front_porch_overhead
state: 'off'
- condition: state
entity_id:
- binary_sensor.front_porch_motion
- binary_sensor.front_porch_person_occupancy
- binary_sensor.front_yard_person_occupancy
state: 'on'
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: 5
# - condition: state
# entity_id: binary_sensor.outer_garage_door
# state: 'off'
- condition: state
entity_id: binary_sensor.outer_garage_door_contact
state: 'off'
- condition: state
entity_id: light.front_porch_overhead
state: 'on'
sequence:
- service: light.turn_off
target:
entity_id: light.front_porch_overhead