From f2f253b135a5101ff1b24b3a60a4f0124d27fca3 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Fri, 24 May 2024 16:21:48 -0400 Subject: [PATCH] Automation framework --- automations.yaml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/automations.yaml b/automations.yaml index c72f258..05b8954 100644 --- a/automations.yaml +++ b/automations.yaml @@ -5314,6 +5314,84 @@ data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} +- id: '1716580842614' + alias: Stairwell and Hallway Motion Lighting + description: '' + trigger: + - platform: state + entity_id: + - binary_sensor.stairwell_top_motion + to: 'on' + from: 'off' + id: top-detected + alias: Stairwell Top Detected + - platform: state + entity_id: + - binary_sensor.stairwell_bottom_motion + from: 'off' + to: 'on' + id: bottom-detected + alias: Stairwell Bottom Detected + - platform: state + entity_id: + - binary_sensor.stairwell_top_motion + from: 'on' + to: 'off' + id: top-clear + alias: Stairwell Top Clear + - platform: state + entity_id: + - binary_sensor.stairwell_bottom_motion + from: 'on' + to: 'off' + id: bottom-clear + alias: Stairwell Bottom Clear + - platform: event + event_type: timer.finished + event_data: + entity_id: timer.stairwell_motion_timer + id: stairwell-timer + alias: Stairwell Timer Finished + - alias: Hallway Timer Finished + platform: event + event_type: timer.finished + event_data: + entity_id: timer.upstairs_hallway_motion_timer + id: hallway-timer + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: + - top-detected + sequence: [] + - conditions: + - condition: trigger + id: + - bottom-detected + sequence: [] + - conditions: + - condition: trigger + id: + - top-clear + sequence: [] + - conditions: + - condition: trigger + id: + - bottom-clear + sequence: [] + - conditions: + - condition: trigger + id: + - stairwell-timer + sequence: [] + - conditions: + - condition: trigger + id: + - hallway-timer + sequence: [] + mode: restart ' alias: Set time morning meds were taken