change pending_time to arming_time (#12531)

* change pending_time to arming_time

* match previous default delay_time

before the time triggering was pending_time (now called arming_time) + delay_time = 60seconds
Now it is only the delay_time, so also set this to 60 seconds

* small fixes

* ✏️ Additional spaces removed

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
starkillerOG 2020-04-24 01:05:52 +02:00 committed by GitHub
parent b6094f9a5b
commit 479c02ea1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,17 +45,17 @@ code_arm_required:
type: boolean type: boolean
default: true default: true
delay_time: delay_time:
description: The time in seconds of the pending time before triggering the alarm. description: The time in seconds of the 'pending' state before triggering the alarm.
required: false required: false
type: integer type: integer
default: 0 default: 60
pending_time: arming_time:
description: The time in seconds of the pending time before effecting a state change. description: The time in seconds of the 'arming' state before effecting a state change.
required: false required: false
type: integer type: integer
default: 60 default: 60
trigger_time: trigger_time:
description: The time in seconds of the trigger time in which the alarm is firing. description: The time in seconds of the 'triggered' state in which the alarm is firing.
required: false required: false
type: integer type: integer
default: 120 default: 120
@ -73,8 +73,8 @@ armed_custom_bypass/armed_home/armed_away/armed_night/disarmed/triggered:
description: State specific setting for **delay_time** (all states except **triggered**) description: State specific setting for **delay_time** (all states except **triggered**)
required: false required: false
type: integer type: integer
pending_time: arming_time:
description: State specific setting for **pending_time** (all states except **disarmed**) description: State specific setting for **arming_time** (all states except **disarmed**)
required: false required: false
type: integer type: integer
trigger_time: trigger_time:
@ -86,20 +86,19 @@ armed_custom_bypass/armed_home/armed_away/armed_night/disarmed/triggered:
## State machine ## State machine
The state machine of the manual alarm integration is complex but powerful. The The state machine of the manual alarm integration is complex but powerful. The
transitions are timed according to three values, **delay_time**, **pending_time** transitions are timed according to three values, **delay_time**, **arming_time**
and **trigger_time**. The values in turn can come from the default configuration and **trigger_time**. The values in turn can come from the default configuration
variable or from a state-specific override. variable or from a state-specific override.
When the alarm is armed, its state first goes to **pending** for a number When the alarm is armed, its state first goes to **arming** for a number
of seconds equal to the destination state's **pending_time**, and then of seconds equal to the destination state's **arming_time**, and then
transitions to one of the "armed" states. Note that **code_template** transitions to one of the "armed" states. Note that **code_template**
never receives "pending" in the **to_state** variable; instead, never receives "arming" in the **to_state** variable; instead,
**to_state** contains the state which the user has requested. However, **to_state** contains the state which the user has requested. However,
**from_state** *can* contain "pending". **from_state** *can* contain "arming".
When the alarm is triggered, its state goes to **pending** for a number of When the alarm is triggered, its state goes to **pending** for a number of
seconds equal to the previous state's **delay_time** plus the triggered seconds equal to the previous state's **delay_time**. Then the alarm transitions to the "triggered"
state's **pending_time**. Then the alarm transitions to the "triggered"
states. The code is never checked when triggering the alarm, so the states. The code is never checked when triggering the alarm, so the
**to_state** variable of **code_template** cannot ever contain "triggered" **to_state** variable of **code_template** cannot ever contain "triggered"
either; again, **from_state** *can* contain "triggered". either; again, **from_state** *can* contain "triggered".
@ -110,12 +109,11 @@ it goes back to either the previous state or **disarmed**. If the previous
state's **trigger_time** is zero, the transition to "triggered" is entirely state's **trigger_time** is zero, the transition to "triggered" is entirely
blocked and the alarm remains in the armed state. blocked and the alarm remains in the armed state.
Each of the settings is useful in different scenarios. **pending_time** gives Each of the settings is useful in different scenarios. **arming_time** gives
you some time to leave the building (for "armed" states) or to disarm the alarm you some time to leave the building (for "armed" states).
(for the "triggered" state).
**delay_time** can also be used to allow some time to disarm the alarm, but with **delay_time** can be used to allow some time to disarm the alarm, with
more flexibility. For example, you could specify a delay time for the flexibility. For example, you could specify a delay time for the
"armed away" state, in order to avoid triggering the alarm while the "armed away" state, in order to avoid triggering the alarm while the
garage door opens, but not for the "armed home" state. garage door opens, but not for the "armed home" state.
@ -136,13 +134,13 @@ alarm_control_panel:
- platform: manual - platform: manual
name: Home Alarm name: Home Alarm
code: 1234 code: 1234
pending_time: 30 arming_time: 30
delay_time: 20 delay_time: 20
trigger_time: 4 trigger_time: 4
disarmed: disarmed:
trigger_time: 0 trigger_time: 0
armed_home: armed_home:
pending_time: 0 arming_time: 0
delay_time: 0 delay_time: 0
``` ```