Skip to content

Commit

Permalink
Fix arm/disarm calls. (#17381)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrrg authored and fabaff committed Oct 13, 2018
1 parent 5f16f3c commit d9d2773
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions homeassistant/components/alarm_control_panel/spc.py
Expand Up @@ -85,19 +85,23 @@ def state(self):
async def async_alarm_disarm(self, code=None):
"""Send disarm command."""
from pyspcwebgw.const import AreaMode
self._api.change_mode(area=self._area, new_mode=AreaMode.UNSET)
await self._api.change_mode(area=self._area,
new_mode=AreaMode.UNSET)

async def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
from pyspcwebgw.const import AreaMode
self._api.change_mode(area=self._area, new_mode=AreaMode.PART_SET_A)
await self._api.change_mode(area=self._area,
new_mode=AreaMode.PART_SET_A)

async def async_alarm_arm_night(self, code=None):
"""Send arm home command."""
from pyspcwebgw.const import AreaMode
self._api.change_mode(area=self._area, new_mode=AreaMode.PART_SET_B)
await self._api.change_mode(area=self._area,
new_mode=AreaMode.PART_SET_B)

async def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
from pyspcwebgw.const import AreaMode
self._api.change_mode(area=self._area, new_mode=AreaMode.FULL_SET)
await self._api.change_mode(area=self._area,
new_mode=AreaMode.FULL_SET)

0 comments on commit d9d2773

Please sign in to comment.