* Fixed missing Canary sensors and Canary alarm control panel that was not updating correctly * Resolved pylinting warnings in original tests
This commit is contained in:
parent
d28d1ff657
commit
3e8728ad5f
3 changed files with 55 additions and 48 deletions
|
@ -49,7 +49,6 @@ class CanaryAlarm(AlarmControlPanel):
|
|||
@property
|
||||
def state(self):
|
||||
"""Return the state of the device."""
|
||||
|
||||
location = self._data.get_location(self._location_id)
|
||||
|
||||
if location.is_private:
|
||||
|
@ -82,15 +81,16 @@ class CanaryAlarm(AlarmControlPanel):
|
|||
|
||||
def alarm_arm_home(self, code=None):
|
||||
"""Send arm home command."""
|
||||
|
||||
self._data.set_location_mode(self._location_id, LOCATION_MODE_HOME)
|
||||
|
||||
def alarm_arm_away(self, code=None):
|
||||
"""Send arm away command."""
|
||||
|
||||
self._data.set_location_mode(self._location_id, LOCATION_MODE_AWAY)
|
||||
|
||||
def alarm_arm_night(self, code=None):
|
||||
"""Send arm night command."""
|
||||
|
||||
self._data.set_location_mode(self._location_id, LOCATION_MODE_NIGHT)
|
||||
|
||||
def update(self):
|
||||
"""Get the latest state of the sensor."""
|
||||
self._data.update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue