From 5f2a52b95d3b7ee60c6cc01714be102ed592ddbb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Oct 2015 20:21:16 +0200 Subject: [PATCH] Add example --- .../alarm_control_panel.manual.markdown | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/source/components/alarm_control_panel.manual.markdown b/source/components/alarm_control_panel.manual.markdown index ea04b3d4fcc..8b23255ab80 100644 --- a/source/components/alarm_control_panel.manual.markdown +++ b/source/components/alarm_control_panel.manual.markdown @@ -29,3 +29,36 @@ Configuration variables: - **pending_time** (*Optional*): The time in seconds of the pending time before arming the alarm. Default is 60 seconds. - **trigger_time** (*Optional*): The time in seconds of the trigger time in which the alarm is firing. Default is 120 seconds. + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this panel. + +### {% linkable_title Sensors %} + +Using sensors to trigger the alarm. + +```yaml +automation: +- alias: 'Trigger alarm while armed away' + trigger: + - platform: state + entity_id: sensor.pir1 + state: 'active' + - platform: state + entity_id: sensor.pir2 + state: 'active' + - platform: state + entity_id: sensor.door + state: 'open' + - platform: state + entity_id: sensor.window + state: 'open' + condition: + - platform: state + entity_id: alarm_control_panel.ha_alarm + state: armed_away + action: + service: alarm_control_panel.alarm_trigger + entity_id: alarm_control_panel.ha_alarm +```