From abab6792d4910f518133950084dae59e1667bd6d Mon Sep 17 00:00:00 2001 From: Ciquattro Date: Tue, 12 Feb 2019 00:35:38 +0100 Subject: [PATCH] Added notifications on changed status of the alarm (#7957) * Added notification on changed status of the alarm * :pencil2: Tweaks --- .../alarm_control_panel.manual.markdown | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/source/_components/alarm_control_panel.manual.markdown b/source/_components/alarm_control_panel.manual.markdown index 2f3c49b2cbc..d6dba870785 100644 --- a/source/_components/alarm_control_panel.manual.markdown +++ b/source/_components/alarm_control_panel.manual.markdown @@ -205,3 +205,65 @@ automation: - service: alarm_control_panel.alarm_disarm entity_id: alarm_control_panel.house_alarm ``` + +Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pending Status + +{% raw %} +```yaml +- alias: 'Send notification when alarm is Disarmed' + initial_state: 'on' + trigger: + - platform: state + entity_id: alarm_control_panel.home_alarm + to: 'disarmed' + action: + - service: notify.notify + data: + message: "ALARM! The alarm is Disarmed at {{ states('sensor.date__time') }}" +``` +{% endraw %} + +{% raw %} +```yaml +- alias: 'Send notification when alarm is in pending status' + initial_state: 'on' + trigger: + - platform: state + entity_id: alarm_control_panel.home_alarm + to: 'pending' + action: + - service: notify.notify + data: + message: "ALARM! The alarm is in pending status at {{ states('sensor.date__time') }}" +``` +{% endraw %} + +{% raw %} +```yaml +- alias: 'Send notification when alarm is Armed in Away mode' + initial_state: 'on' + trigger: + - platform: state + entity_id: alarm_control_panel.home_alarm + to: 'armed_away' + action: + - service: notify.notify + data: + message: "ALARM! The alarm is armed in Away mode {{ states('sensor.date__time') }}" +``` +{% endraw %} + +{% raw %} +```yaml +- alias: 'Send notification when alarm is Armed in Home mode' + initial_state: 'on' + trigger: + - platform: state + entity_id: alarm_control_panel.home_alarm + to: 'armed_home' + action: + - service: notify.notify + data: + message: "ALARM! The alarm is armed in Home mode {{ states('sensor.date__time') }}" +``` +{% endraw %}