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

@ -2,6 +2,7 @@
import logging
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.components.alarm_control_panel.const import SUPPORT_ALARM_ARM_AWAY
from homeassistant.const import (
ATTR_ATTRIBUTION,
STATE_ALARM_ARMED_AWAY,
@ -52,6 +53,11 @@ class BlinkSyncModule(AlarmControlPanel):
"""Return the state of the device."""
return self._state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_AWAY
@property
def name(self):
"""Return the name of the panel."""