Add supported_features to Alarm Control Panel to limit device_actions (#29065)

* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
This commit is contained in:
SukramJ 2019-11-26 00:42:53 +01:00 committed by Paulus Schoutsen
parent 3203cba01f
commit 1fde0d18ed
35 changed files with 449 additions and 66 deletions

View file

@ -1,16 +1,17 @@
"""Demo platform that has two fake alarm control panels."""
import datetime
from homeassistant.components.manual.alarm_control_panel import ManualAlarm
from homeassistant.const import (
CONF_DELAY_TIME,
CONF_PENDING_TIME,
CONF_TRIGGER_TIME,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_CUSTOM_BYPASS,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_DISARMED,
STATE_ALARM_TRIGGERED,
CONF_DELAY_TIME,
CONF_PENDING_TIME,
CONF_TRIGGER_TIME,
)