From 1516d7e31cdd8ae650be646f6be00d3e9b81ee9f Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Mon, 20 Apr 2020 17:36:16 +0300 Subject: [PATCH] Add door opened notification --- config/lovelace/home_dashboard/09_system.yaml | 1 + config/packages/modules/notification.yaml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/config/lovelace/home_dashboard/09_system.yaml b/config/lovelace/home_dashboard/09_system.yaml index bab6507..1346ef2 100644 --- a/config/lovelace/home_dashboard/09_system.yaml +++ b/config/lovelace/home_dashboard/09_system.yaml @@ -104,6 +104,7 @@ cards: tap_action: none entities: - automation.notification_phone_battery_low + - automation.notification_door_opened - type: divider diff --git a/config/packages/modules/notification.yaml b/config/packages/modules/notification.yaml index 58873a9..4c40427 100644 --- a/config/packages/modules/notification.yaml +++ b/config/packages/modules/notification.yaml @@ -19,3 +19,23 @@ automation: "Hey, your phone is running low on battery, put it on the charger!" ] | random }} + + - alias: Notification · Door opened + trigger: + platform: state + entity_id: binary_sensor.front_door_on_off + to: "on" + for: + minutes: 2 + action: + service: script.say + data_template: + title: "❕*Notification Module*" + message: >- + + {{ + [ + "Hey, the front door is opened. Are you home?!", + "Hey, the front door has been opened for 2 minutes!" + ] | random + }}