Add strict type annotations to alarm_control_panel (#50945)
* Add strict type annotations * Apply suggestions * Type code as optional string
This commit is contained in:
parent
f55213d8b1
commit
dbefa8fac0
14 changed files with 128 additions and 77 deletions
|
@ -1,14 +1,16 @@
|
|||
"""Provides the constants needed for component."""
|
||||
|
||||
SUPPORT_ALARM_ARM_HOME = 1
|
||||
SUPPORT_ALARM_ARM_AWAY = 2
|
||||
SUPPORT_ALARM_ARM_NIGHT = 4
|
||||
SUPPORT_ALARM_TRIGGER = 8
|
||||
SUPPORT_ALARM_ARM_CUSTOM_BYPASS = 16
|
||||
from typing import Final
|
||||
|
||||
CONDITION_TRIGGERED = "is_triggered"
|
||||
CONDITION_DISARMED = "is_disarmed"
|
||||
CONDITION_ARMED_HOME = "is_armed_home"
|
||||
CONDITION_ARMED_AWAY = "is_armed_away"
|
||||
CONDITION_ARMED_NIGHT = "is_armed_night"
|
||||
CONDITION_ARMED_CUSTOM_BYPASS = "is_armed_custom_bypass"
|
||||
SUPPORT_ALARM_ARM_HOME: Final = 1
|
||||
SUPPORT_ALARM_ARM_AWAY: Final = 2
|
||||
SUPPORT_ALARM_ARM_NIGHT: Final = 4
|
||||
SUPPORT_ALARM_TRIGGER: Final = 8
|
||||
SUPPORT_ALARM_ARM_CUSTOM_BYPASS: Final = 16
|
||||
|
||||
CONDITION_TRIGGERED: Final = "is_triggered"
|
||||
CONDITION_DISARMED: Final = "is_disarmed"
|
||||
CONDITION_ARMED_HOME: Final = "is_armed_home"
|
||||
CONDITION_ARMED_AWAY: Final = "is_armed_away"
|
||||
CONDITION_ARMED_NIGHT: Final = "is_armed_night"
|
||||
CONDITION_ARMED_CUSTOM_BYPASS: Final = "is_armed_custom_bypass"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue