From e95607051aeab52b734d21d22fd9f6fa20f61d64 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:35:47 +0200 Subject: [PATCH] change order of zone alert --- packages/zone.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/zone.yaml b/packages/zone.yaml index ee9e7b1..8d26363 100644 --- a/packages/zone.yaml +++ b/packages/zone.yaml @@ -35,10 +35,6 @@ automation: entity_id: "person.sina" zone: "zone.elmo" event: "enter" - condition: - - alias: "Only if Kevin is not nearby" - condition: template - value_template: "{{ distance('device_tracker.sm_g975f', 'device_tracker.oneplus_a3003') < 1 }}" action: - alias: "Wait until Sina leaves Zone again" wait_for_trigger: @@ -50,6 +46,9 @@ automation: - alias: "Only continue when at least 30 minutes in zone" condition: template value_template: "{{ wait.completed }}" + - alias: "Only if Kevin is not nearby" + condition: template + value_template: "{{ distance('device_tracker.sm_g975f', 'device_tracker.oneplus_a3003') < 1 }}" - alias: "Update travel time home of Sina" service: homeassistant.update_entity entity_id: sensor.travel_time_home_user_two_here