From 09e7c125cd20fd0328930bc2e6cd4a01a9b4f74e Mon Sep 17 00:00:00 2001 From: pgrondek Date: Sat, 17 Apr 2021 12:35:50 +0200 Subject: [PATCH] WIP Sleep as Android automations --- automations/files/automations/phone-automations.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/automations/files/automations/phone-automations.yaml b/automations/files/automations/phone-automations.yaml index 369d849..7bd0cbb 100644 --- a/automations/files/automations/phone-automations.yaml +++ b/automations/files/automations/phone-automations.yaml @@ -13,7 +13,7 @@ entity_id: device_tracker.sm_g965f type: is_home - condition: template - value_template: '{{ trigger.event.data.event == ''SLEEP_TRACKING_STARTED'' }}' + value_template: '{{ trigger.json.event == ''sleep_tracking_started'' }}' sequence: - service: notify.mobile_app_sm_g965f data: @@ -26,7 +26,7 @@ entity_id: device_tracker.sm_g965f type: is_home - condition: template - value_template: '{{ trigger.event.data.event == ''SLEEP_TRACKING_STOPPED'' }}' + value_template: '{{ trigger.json.event == ''sleep_tracking_stopped'' }}' sequence: - service: notify.mobile_app_sm_g965f data: @@ -35,5 +35,6 @@ default: - service: notify.mobile_app_sm_g965f data: - message: 'Unknown state ' + title: 'Sleep As Android automation' + message: 'Unknown event: {{ trigger.json }} '