fixes from review

This commit is contained in:
Per Sandström 2015-09-14 17:33:43 +02:00
parent 6c3a78df30
commit 13ca42e187
3 changed files with 10 additions and 9 deletions

View file

@ -49,6 +49,12 @@ class VerisureAlarm(alarm.AlarmControlPanel):
@property
def state(self):
""" Returns the state of the device. """
return self._state
def update(self):
''' update alarm status '''
verisure.update()
if verisure.STATUS[self._device][self._id].status == 'unarmed':
self._state = STATE_ALARM_DISARMED
elif verisure.STATUS[self._device][self._id].status == 'armedhome':
@ -59,11 +65,6 @@ class VerisureAlarm(alarm.AlarmControlPanel):
_LOGGER.error(
'Unknown alarm state %s',
verisure.STATUS[self._device][self._id].status)
return self._state
def update(self):
''' update alarm status '''
verisure.update()
def alarm_disarm(self, code):
""" Send disarm command. """