From 92bcf7e5e8668b0af992eff351710f8fbf5b831f Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Fri, 1 Dec 2023 14:55:54 -0500 Subject: [PATCH] Disarm security when K is on his way home, also #154 --- automations.yaml | 120 +++++++++++++++++++++++++++++++++++++++++ packages/presence.yaml | 98 --------------------------------- 2 files changed, 120 insertions(+), 98 deletions(-) diff --git a/automations.yaml b/automations.yaml index eb7c0ab..d626c18 100644 --- a/automations.yaml +++ b/automations.yaml @@ -3943,3 +3943,123 @@ alias: Night Brightness mode: queued max: 10 +- id: '1701460148772' + alias: Kallen left School + description: '' + trigger: + - entity_id: person.tony_stork + event: leave + platform: zone + zone: zone.middle_school + - entity_id: person.christina_stork + event: leave + platform: zone + zone: zone.middle_school + - entity_id: person.kallen_stork + event: leave + platform: zone + zone: zone.middle_school + condition: + - condition: time + after: '11:30:00' + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: input_boolean.kallen_at_school + state: 'on' + action: + - service: input_boolean.turn_off + entity_id: input_boolean.kallen_at_school + alias: Turn off Kallen At School + - service: script.text_notify + data: + type: alert + who: parents + message: Kallen has been picked up from school. + title: Kallen Location Alert + tag: kallen-pickup + alias: Text notification + - service: script.speech_engine + data: + who: alexa_everywhere + message: Collin has been picked up from school. + alias: TTS announcement + - delay: + hours: 0 + minutes: 0 + seconds: 30 + milliseconds: 0 + - if: + - condition: state + entity_id: alarm_control_panel.nerdhome_alarm_panel + state: armed_home + then: + - service: alarm_control_panel.alarm_disarm + data: {} + target: + entity_id: alarm_control_panel.nerdhome_alarm_panel + alias: Disarm security if we are home + mode: single + initial_state: true +- id: '1701460391339' + alias: Kallen is at School + description: '' + trigger: + - entity_id: person.tony_stork + event: leave + platform: zone + zone: zone.middle_school + - entity_id: person.christina_stork + event: leave + platform: zone + zone: zone.middle_school + - entity_id: person.kallen_stork + event: enter + platform: zone + zone: zone.middle_school + condition: + - condition: time + before: '11:30:00' + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: input_boolean.kallen_at_school + state: 'off' + - condition: state + entity_id: input_boolean.kallen_school_today + state: 'on' + action: + - service: input_boolean.turn_on + target: + entity_id: input_boolean.kallen_at_school + data: {} + - service: input_boolean.turn_on + target: + entity_id: input_boolean.kallen_awake + data: {} + - service: script.text_notify + data: + type: alert + who: parents + message: Kallen has been dropped off at school. + title: Kallen Location Alert + tag: kallen-dropoff + - if: + - condition: template + value_template: '{{ is_state(''input_boolean.master_bedroom_sleeping'',''on'') + and is_state(''input_boolean.kallen_overnight'',''off'') }}' + then: + - service: light.turn_off + target: + entity_id: + - light.first_floor_lights + data: {} + mode: single diff --git a/packages/presence.yaml b/packages/presence.yaml index 3a64228..82fe4c6 100644 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -458,104 +458,6 @@ intent_script: {% endif %} automation: - - id: kallen_at_school - alias: Kallen is at School - mode: single - trigger: - - entity_id: person.tony_stork - event: leave - platform: zone - zone: zone.middle_school - - entity_id: person.christina_stork - event: leave - platform: zone - zone: zone.middle_school - - entity_id: person.kallen_stork - event: enter - platform: zone - zone: zone.middle_school - condition: - - condition: time - before: "11:30:00" - weekday: - - mon - - tue - - wed - - thu - - fri - - condition: state - entity_id: input_boolean.kallen_at_school - state: "off" - - condition: state - entity_id: input_boolean.kallen_school_today - state: "on" - action: - - service: input_boolean.turn_on - target: - entity_id: input_boolean.kallen_at_school - - service: input_boolean.turn_on - target: - entity_id: input_boolean.kallen_awake - - service: script.text_notify - data: - type: alert - who: parents - message: "Kallen has been dropped off at school." - title: "Kallen Location Alert" - tag: kallen-dropoff - - if: - - condition: template - value_template: "{{ is_state('input_boolean.master_bedroom_sleeping','on') and is_state('input_boolean.kallen_overnight','off') }}" - then: - - service: light.turn_off - target: - entity_id: - - light.first_floor_lights - - - id: kallen_left_school - alias: Kallen left School - mode: single - trigger: - - entity_id: person.tony_stork - event: leave - platform: zone - zone: zone.middle_school - - entity_id: person.christina_stork - event: leave - platform: zone - zone: zone.middle_school - - entity_id: person.kallen_stork - event: leave - platform: zone - zone: zone.middle_school - condition: - - condition: time - after: "11:30:00" - weekday: - - mon - - tue - - wed - - thu - - fri - - condition: state - entity_id: input_boolean.kallen_at_school - state: "on" - action: - - service: input_boolean.turn_off - entity_id: input_boolean.kallen_at_school - - service: script.text_notify - data: - type: alert - who: parents - message: "Kallen has been picked up from school." - title: "Kallen Location Alert" - tag: kallen-pickup - - service: script.speech_engine - data: - who: alexa_everywhere - message: "Collin has been picked up from school." - initial_state: true - # - id: 395ebb76-83e4-4a7c-913e-2598fef3d5c1 # alias: Doorbell Alert # trigger: