fix issues and note only away/home (#3040)

This commit is contained in:
Graham Brown 2023-07-19 22:31:03 +02:00 committed by GitHub
parent 0d0b6ab063
commit 500a93608d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 15 deletions

View File

@ -94,7 +94,7 @@ This action arms the alarm in away mode. The ``code`` is required when *requires
on_...:
then:
- alarm_control_panel.arm_away:
id: alarm
id: acp1
code: "1234"
.. _alarm_control_panel_arm_home_action:
@ -109,7 +109,7 @@ This action arms the alarm in home mode. The ``code`` is required when *requires
on_...:
then:
- alarm_control_panel.arm_home:
id: alarm
id: acp1
code: "1234"
.. _alarm_control_panel_disarm_action:
@ -124,7 +124,7 @@ This action disarms the alarm. The ``code`` is required when *codes* is not empt
on_...:
then:
- alarm_control_panel.disarm:
id: alarm
id: acp1
code: "1234"
.. _alarm_control_panel_pending_action:
@ -138,7 +138,7 @@ This action puts the alarm in pending state (the state before triggered after *p
on_...:
then:
- alarm_control_panel.pending: alarm
- alarm_control_panel.pending: acp1
.. _alarm_control_panel_triggered_action:
@ -151,7 +151,7 @@ This action puts the alarm in triggered state.
on_...:
then:
- alarm_control_panel.triggered: alarm
- alarm_control_panel.triggered: acp1
.. _alarm_control_panel_is_armed_condition:
@ -165,7 +165,7 @@ This :ref:`Condition <config-condition>` checks if the alarm control panel is ar
on_...:
if:
condition:
alarm_control_panel.is_armed: alarm
alarm_control_panel.is_armed: acp1
.. _alarm_control_panel_lambda_calls:
@ -181,9 +181,9 @@ From :ref:`lambdas <config-lambda>`, you can call the following methods:
.. code-block:: cpp
id(alarm).arm_away();
id(alarm).arm_home();
id(alarm).disarm("1234");
id(acp1).arm_away();
id(acp1).arm_home();
id(acp1).disarm("1234");
Platforms

View File

@ -56,16 +56,24 @@ State Flow:
1. The alarm starts in ``DISARMED`` state
2. When the ``arm_...`` method is invoked
a. ``arming_time`` greater than 0 the state is ``ARMING``
b. ``arming_time`` is 0 or after the ``arming_time`` delay the state is ``ARM_AWAY`` or ``ARM_HOME``
a. ``arming_..._time`` is greater than 0 the state is ``ARMING``
b. ``arming_..._time`` is 0 or after the delay the state is ``ARMED_...``
3. When the alarm is tripped by a sensor state changing to ``on``
3. When the alarm is tripped by a sensor state changing to ``on`` or ``alarm_control_panel_pending_action`` invoked
a. ``pending_time`` greater than 0 the state is ``PENDING``
b. ``pending_time`` is 0 or after the ``pending_time`` delay the state is ``TRIGGERED``
4. If ``trigger_time`` greater than 0 and no sensors are ``on`` after ``trigger_time`` delay
the state returns to ``ARM_AWAY`` or ``ARM_HOME``
the state returns to ``ARM_...``
.. note::
Although the interface supports all arming modes only ``away`` and ``home`` have been implemented for now.
``arm_...`` is for either ``arm_away`` or ``arm_home``
``arming_..._time`` is for either ``arming_away_time`` or ``arming_home_time``
``ARMED_...`` is for either ``ARMED_AWAY`` or ``ARMED_HOME``
Example:
--------
@ -75,11 +83,13 @@ Example:
alarm_control_panel:
platform: template
name: Alarm Panel
id: acp1
codes:
- "1234"
requires_code_to_arm: true
arming_time: 10s
pending_time: 15s
arming_away_time: 30s
arming_home_time: 5s
pending_time: 30s
trigger_time: 5min
binary_sensors:
- input: zone_1