several changes to Manual Alarm panel doc (#9969)

* several changes to Manual Alarm panel doc

took out the double underscores in the sensor.date_time templates
changed the data field to data_template field where applicable (since the messages use the template)
commented out the initial_state: 'on', since that is no longer required
provided 1 example using multi-line notation

* Update manual.markdown

all agreed and changed
This commit is contained in:
Marius 2019-07-26 16:06:23 +02:00 committed by Franck Nijhof
parent 59b92ef9a2
commit 1df189b778

View File

@ -214,59 +214,57 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend
{% raw %} {% raw %}
```yaml ```yaml
- alias: 'Send notification when alarm is Disarmed' - alias: 'Send notification when alarm is Disarmed'
initial_state: 'on'
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'disarmed' to: 'disarmed'
action: action:
- service: notify.notify - service: notify.notify
data: data_template:
message: "ALARM! The alarm is Disarmed at {{ states('sensor.date__time') }}" message: "ALARM! The alarm is Disarmed at {{ states('sensor.date_time') }}"
``` ```
{% endraw %} {% endraw %}
{% raw %} {% raw %}
```yaml ```yaml
- alias: 'Send notification when alarm is in pending status' - alias: 'Send notification when alarm is in pending status'
initial_state: 'on'
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'pending' to: 'pending'
action: action:
- service: notify.notify - service: notify.notify
data: data_template:
message: "ALARM! The alarm is in pending status at {{ states('sensor.date__time') }}" message: "ALARM! The alarm is in pending status at {{ states('sensor.date_time') }}"
``` ```
{% endraw %} {% endraw %}
{% raw %} {% raw %}
```yaml ```yaml
- alias: 'Send notification when alarm is Armed in Away mode' - alias: 'Send notification when alarm is Armed in Away mode'
initial_state: 'on'
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'armed_away' to: 'armed_away'
action: action:
- service: notify.notify - service: notify.notify
data: data_template:
message: "ALARM! The alarm is armed in Away mode {{ states('sensor.date__time') }}" message: "ALARM! The alarm is armed in Away mode {{ states('sensor.date_time') }}"
``` ```
{% endraw %} {% endraw %}
{% raw %} {% raw %}
```yaml ```yaml
- alias: 'Send notification when alarm is Armed in Home mode' - alias: 'Send notification when alarm is Armed in Home mode'
initial_state: 'on'
trigger: trigger:
- platform: state - platform: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
to: 'armed_home' to: 'armed_home'
action: action:
- service: notify.notify - service: notify.notify
data: data_template:
message: "ALARM! The alarm is armed in Home mode {{ states('sensor.date__time') }}" # Using multi-line notation allows for easier quoting
message: >
ALARM! The alarm is armed in Home mode {{ states('sensor.date_time') }}
``` ```
{% endraw %} {% endraw %}