From 698d133455002db8541fb5b28e296ad300a3af3e Mon Sep 17 00:00:00 2001 From: lekobob Date: Wed, 23 Aug 2017 23:09:50 -0700 Subject: [PATCH] Simplisafe unknown status fix (#9111) * Simplisafe unknown status fix Changed simplisafe-python requirement to 1.0.5 and changed state return case statements to lower case * Bump requirements_all.txt --- .../components/alarm_control_panel/simplisafe.py | 8 ++++---- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/alarm_control_panel/simplisafe.py b/homeassistant/components/alarm_control_panel/simplisafe.py index 5eb2e9fe7d3..7f4e4dfa756 100644 --- a/homeassistant/components/alarm_control_panel/simplisafe.py +++ b/homeassistant/components/alarm_control_panel/simplisafe.py @@ -16,7 +16,7 @@ from homeassistant.const import ( EVENT_HOMEASSISTANT_STOP) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['simplisafe-python==1.0.4'] +REQUIREMENTS = ['simplisafe-python==1.0.5'] _LOGGER = logging.getLogger(__name__) @@ -89,11 +89,11 @@ class SimpliSafeAlarm(alarm.AlarmControlPanel): def state(self): """Return the state of the device.""" status = self.simplisafe.state() - if status == 'Off': + if status == 'off': state = STATE_ALARM_DISARMED - elif status == 'Home': + elif status == 'home': state = STATE_ALARM_ARMED_HOME - elif status == 'Away': + elif status == 'away': state = STATE_ALARM_ARMED_AWAY else: state = STATE_UNKNOWN diff --git a/requirements_all.txt b/requirements_all.txt index e71358e91b3..cf6325e6572 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -884,7 +884,7 @@ sharp_aquos_rc==0.3.2 shodan==1.7.4 # homeassistant.components.alarm_control_panel.simplisafe -simplisafe-python==1.0.4 +simplisafe-python==1.0.5 # homeassistant.components.notify.slack slacker==0.9.60