Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 59 additions & 45 deletions source/_integrations/alarm_control_panel.template.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,58 +31,72 @@ To enable a Template Alarm Control Panel in your installation, add the following
# Example configuration.yaml entry
alarm_control_panel:
- platform: template
name: Safe Alarm Panel
value_template: "{{ states('alarm_control_panel.real_alarm') }}"
arm_away:
service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
arm_home:
service: alarm_control_panel.alarm_arm_home
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
disarm:
- condition: state
entity_id: device_tracker.paulus
state: 'home'
- service: alarm_control_panel.alarm_arm_home
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
panels:
safe_alarm_panel:
value_template: "{{ states('alarm_control_panel.real_alarm') }}"
arm_away:
service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
arm_home:
service: alarm_control_panel.alarm_arm_home
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
disarm:
- condition: state
entity_id: device_tracker.paulus
state: 'home'
- service: alarm_control_panel.alarm_arm_home
data:
entity_id: alarm_control_panel.real_alarm
code: !secret alarm_code
```

{% endraw %}

{% configuration %}
name:
description: Name to use in the frontend.
required: false
type: string
default: Template Alarm Control Panel
value_template:
description: "Defines a template to set the state of the alarm panel. Only the states `armed_away`, `armed_home`, `armed_night`, `disarmed`, `triggered` and `unavailable` are used."
required: false
type: template
disarm:
description: Defines an action to run when the alarm is disarmed.
required: false
type: action
arm_away:
description: Defines an action to run when the alarm is armed to away mode.
required: false
type: action
arm_home:
description: Defines an action to run when the alarm is armed to home mode.
required: false
type: action
arm_night:
description: Defines an action to run when the alarm is armed to night mode.
required: false
type: action
panels:
description: List of your panels.
required: true
type: map
keys:
alarm_control_panel_name:
description: The slug of the panel.
required: true
type: map
keys:
name:
description: Name to use in the frontend.
required: false
type: string
default: Template Alarm Control Panel
value_template:
description: "Defines a template to set the state of the alarm panel. Only the states `armed_away`, `armed_home`, `armed_night`, `disarmed`, `triggered` and `unavailable` are used."
required: false
type: template
disarm:
description: Defines an action to run when the alarm is disarmed.
required: false
type: action
arm_away:
description: Defines an action to run when the alarm is armed to away mode.
required: false
type: action
arm_home:
description: Defines an action to run when the alarm is armed to home mode.
required: false
type: action
arm_night:
description: Defines an action to run when the alarm is armed to night mode.
required: false
type: action
{% endconfiguration %}




## Considerations

If you are using the state of a integration that takes extra time to load, the Template Alarm Control Panel may get an `unknown` state during startup. This results in error messages in your log file until that integration has completed loading. If you use `is_state()` function in your template, you can avoid this situation.
Expand Down