32bb950b5f4e0cac647353c2b4a7940f908fc73f,homeassistant/components/alarm_control_panel/manual.py,ManualAlarm,alarm_arm_away,#ManualAlarm#Any#,105
Before Change
def alarm_arm_away(self, code=None):
Send arm away command.
if code == str(self._code) or self.code_format is None:
self.update_state(STATE_ALARM_PENDING, STATE_ALARM_ARMED_AWAY)
def delayed_alarm_arm_away(event_time):
Callback for delayed action.
if self._pending_to == STATE_ALARM_ARMED_AWAY and \
dt_util.utcnow() - self._state_ts >= self._pending_time:
self.update_state(STATE_ALARM_ARMED_AWAY, None)
track_point_in_time(
self._hass, delayed_alarm_arm_away,
dt_util.utcnow() + self._pending_time)
else:
_LOGGER.warning("Wrong code entered while arming away!")
def alarm_trigger(self, code=None):
Send alarm trigger command. No code needed.
self.update_state(STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED)
After Change
def alarm_arm_away(self, code=None):
Send arm away command.
if not self._validate_code(code, STATE_ALARM_ARMED_AWAY):
return
self._state = STATE_ALARM_ARMED_AWAY
self._state_ts = dt_util.utcnow()
self.update_ha_state()
if self._pending_time:
track_point_in_time(
self._hass, self.update_ha_state,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 19
Instances
Project Name: home-assistant/home-assistant
Commit Name: 32bb950b5f4e0cac647353c2b4a7940f908fc73f
Time: 2015-10-13
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: alarm_arm_away
Project Name: home-assistant/home-assistant
Commit Name: 32bb950b5f4e0cac647353c2b4a7940f908fc73f
Time: 2015-10-13
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: alarm_disarm
Project Name: home-assistant/home-assistant
Commit Name: 32bb950b5f4e0cac647353c2b4a7940f908fc73f
Time: 2015-10-13
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: alarm_arm_away
Project Name: home-assistant/home-assistant
Commit Name: 32bb950b5f4e0cac647353c2b4a7940f908fc73f
Time: 2015-10-13
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: alarm_arm_home