0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e,homeassistant/components/alarm_control_panel/manual.py,ManualAlarm,state,#ManualAlarm#,122

Before Change


    @property
    def state(self):
        Return the state of the device.
        if self._state == STATE_ALARM_TRIGGERED and self._trigger_time:
            if self._within_pending_time(self._state):
                return STATE_ALARM_PENDING
            elif (self._state_ts + self._pending_time_by_state[self._state] +
                  self._trigger_time) < dt_util.utcnow():
                if self._disarm_after_trigger:
                    return STATE_ALARM_DISARMED
                else:

After Change


        if self._state == STATE_ALARM_TRIGGERED:
            if self._within_pending_time(self._state):
                return STATE_ALARM_PENDING
            trigger_time = self._trigger_time_by_state[self._previous_state]
            if (self._state_ts + self._pending_time(self._state) +
                    trigger_time) < dt_util.utcnow():
                if self._disarm_after_trigger:
                    return STATE_ALARM_DISARMED
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


Project Name: home-assistant/home-assistant
Commit Name: 0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e
Time: 2017-12-03
Author: bonzini@gnu.org
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: state


Project Name: home-assistant/home-assistant
Commit Name: 0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e
Time: 2017-12-03
Author: bonzini@gnu.org
File Name: homeassistant/components/alarm_control_panel/manual_mqtt.py
Class Name: ManualMQTTAlarm
Method Name: state


Project Name: home-assistant/home-assistant
Commit Name: 0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e
Time: 2017-12-03
Author: bonzini@gnu.org
File Name: homeassistant/components/alarm_control_panel/manual_mqtt.py
Class Name: ManualMQTTAlarm
Method Name: _update_state


Project Name: home-assistant/home-assistant
Commit Name: 0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e
Time: 2017-12-03
Author: bonzini@gnu.org
File Name: homeassistant/components/alarm_control_panel/manual.py
Class Name: ManualAlarm
Method Name: _update_state