From 27cf229dab954a415a5765cce2bb4e15cda3dc06 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 11 Mar 2024 14:18:22 -0400 Subject: [PATCH] Try to do a better job of dealing with K not always having his phone --- automations.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++ packages/kallen.yaml | 3 +++ 2 files changed, 46 insertions(+) diff --git a/automations.yaml b/automations.yaml index 3dca178..0724f32 100644 --- a/automations.yaml +++ b/automations.yaml @@ -4079,14 +4079,20 @@ event: leave platform: zone zone: zone.middle_school + id: tony-leave - entity_id: person.christina_stork event: leave platform: zone zone: zone.middle_school + id: tina-leave - entity_id: person.kallen_stork event: leave platform: zone zone: zone.middle_school + id: kallen-leave + - platform: time + at: input_datetime.kallen_school_day_end + id: school-end condition: - condition: time after: '11:30:00' @@ -4100,6 +4106,25 @@ entity_id: input_boolean.kallen_at_school state: 'on' action: + - alias: If Kallen has his phone, don't run at school end time + if: + - condition: and + conditions: + - condition: trigger + id: + - school-end + - alias: If Kallen has his phone, or one of us is picking him up + condition: or + conditions: + - condition: state + entity_id: input_boolean.kallen_has_phone + state: 'on' + - condition: state + entity_id: input_boolean.kallen_alternate_pickup + state: 'off' + alias: Conditions for pickup + then: + - stop: Will use location triggers instead. - service: input_boolean.turn_off entity_id: input_boolean.kallen_at_school alias: Turn off Kallen At School @@ -4667,3 +4692,21 @@ message: clear_notification tag: basement-studio-hot mode: restart +- id: '1710180629143' + alias: Kallen Has Phone + description: Make sure the system knows Kallen has his phone, if his phone leaves + the house. + trigger: + - platform: state + entity_id: + - person.kallen_stork + from: home + to: not_home + condition: [] + action: + - service: input_boolean.turn_on + metadata: {} + data: {} + target: + entity_id: input_boolean.kallen_has_phone + mode: restart diff --git a/packages/kallen.yaml b/packages/kallen.yaml index d67641c..d08c028 100644 --- a/packages/kallen.yaml +++ b/packages/kallen.yaml @@ -25,6 +25,9 @@ input_boolean: kallen_alarm_clock: name: Kallen Alarm Clock icon: mdi:alarm + kallen_has_phone: + name: Kallen Has Phone + icon: mdi:cellphone input_datetime: kallen_bedtime: