32bb950b5f4e0cac647353c2b4a7940f908fc73f,homeassistant/components/alarm_control_panel/manual.py,ManualAlarm,alarm_arm_home,#ManualAlarm#Any#,89
Before Change
def alarm_arm_home(self, code=None):
Send arm home command.
if code == str(self._code) or self.code_format is None:
self.update_state(STATE_ALARM_PENDING, STATE_ALARM_ARMED_HOME)
def delayed_alarm_arm_home(event_time):
Callback for delayed action.
if self._pending_to == STATE_ALARM_ARMED_HOME and \
dt_util.utcnow() - self._state_ts >= self._pending_time:
self.update_state(STATE_ALARM_ARMED_HOME, None)
track_point_in_time(
self._hass, delayed_alarm_arm_home,
dt_util.utcnow() + self._pending_time)
else:
_LOGGER.warning("Wrong code entered while arming home!")
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)
After Change
def alarm_arm_home(self, code=None):
Send arm home command.
if not self._validate_code(code, STATE_ALARM_ARMED_HOME):
return
self._state = STATE_ALARM_ARMED_HOME
self._state_ts = dt_util.utcnow()
self.update_ha_state()
if self._pending_time:
track_point_in_time(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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_home
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: samuelclay/NewsBlur
Commit Name: a4267f423e74595c99ad9642b39d540b8b0c39db
Time: 2012-12-10
Author: samuel@ofbrooklyn.com
File Name: utils/story_functions.py
Class Name:
Method Name: pre_process_story