From 79a4f3eea80626e6ded846a776ea56f45e84f763 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sun, 4 Dec 2016 06:06:08 +0000 Subject: [PATCH] Notify me if a Door is open when we leave or at night. --- automation/watchdog.yaml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/automation/watchdog.yaml b/automation/watchdog.yaml index b9ea2e23..63ab8cac 100755 --- a/automation/watchdog.yaml +++ b/automation/watchdog.yaml @@ -54,12 +54,30 @@ for: 00:05:00 condition: - - condition: sun - after: 'sunset' - - condition: template - value_template: "{{ states('cover.garadget_large') == 'opened' }}" - - condition: template - value_template: "{{ states('cover.garadget_small') == 'opened' }}" + condition: or + conditions: + - condition: and + conditions: + - condition: state + entity_id: group.family + state: not_home + for: 00:05:00 + - condition: or + conditions: + - condition: template + value_template: "{{ states('cover.garadget_large') == 'opened' }}" + - condition: template + value_template: "{{ states('cover.garadget_small') == 'opened' }}" + - condition: and + conditions: + - condition: sun + after: 'sunset' + - condition: or + conditions: + - condition: template + value_template: "{{ states('cover.garadget_large') == 'opened' }}" + - condition: template + value_template: "{{ states('cover.garadget_small') == 'opened'}}" action: service: script.ifttt_notify