From 5187bf8551e96e4a1b4b96624ffca86f7b8110c0 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sun, 27 Aug 2023 18:23:32 -0400 Subject: [PATCH] Hopefully the last fix needed for #108 --- automations.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/automations.yaml b/automations.yaml index 940e7cb..51346d7 100644 --- a/automations.yaml +++ b/automations.yaml @@ -1160,3 +1160,51 @@ option: Reset target: entity_id: input_select.tina_desk_scenes +- id: '1693174941627' + alias: Presence Disconnect Protection + description: When the internet drops, sometimes LIfe360 does too. This automation + prevents the chaos that causes. + trigger: + - platform: state + entity_id: + - binary_sensor.internet + from: 'on' + to: 'off' + id: disconnect + - platform: state + entity_id: + - binary_sensor.internet + from: 'off' + to: 'on' + for: + hours: 0 + minutes: 1 + seconds: 0 + id: reconnect + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: + - disconnect + sequence: + - service: automation.turn_off + data: + stop_actions: true + target: + entity_id: + - automation.family_has_arrived + - automation.family_has_left + - conditions: + - condition: trigger + id: + - reconnect + sequence: + - service: automation.turn_on + data: {} + target: + entity_id: + - automation.family_has_arrived + - automation.family_has_left + mode: restart