Fixes #10773: Demo Alarm Broken (#10777)

* Fixes #10773: Demo Alarm Broken

* Added test for platform setup

* Remove unused import

* Lint fix

* Rework assert to work with python 3.5
This commit is contained in:
uchagani authored and Paulus Schoutsen committed 2017-11-24 20:30:57 -08:00
1 parent fcc164c31e
commit 2817f03378
2 files changed
+14 -2

No files matched your search

@@ -7,7 +7,7 @@ https://home-assistant.io/components/demo/
import homeassistant.components.alarm_control_panel.manual as manual
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_TRIGGERED, CONF_PENDING_TIME)
STATE_ALARM_ARMED_CUSTOM_BYPASS, STATE_ALARM_TRIGGERED, CONF_PENDING_TIME)
def setup_platform(hass, config, add_devices, discovery_info=None):
@@ -23,6 +23,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
STATE_ALARM_ARMED_NIGHT: {
CONF_PENDING_TIME: 5
},
STATE_ALARM_ARMED_CUSTOM_BYPASS: {
CONF_PENDING_TIME: 5
},
STATE_ALARM_TRIGGERED: {
CONF_PENDING_TIME: 5
},