d6a47cb3e058ca3c10eecc048347ef4e51ae4ebe,homeassistant/components/homekit/type_security_systems.py,SecuritySystem,update_state,#SecuritySystem#Any#,79
Before Change
hass_state = new_state.state
if hass_state in HASS_TO_HOMEKIT:
current_security_state = HASS_TO_HOMEKIT[hass_state]
self.char_current_state.set_value(current_security_state)
_LOGGER.debug(
"%s: Updated current state to %s (%d)",
self.entity_id,
hass_state,
After Change
hass_state = new_state.state
if hass_state in HASS_TO_HOMEKIT:
current_security_state = HASS_TO_HOMEKIT[hass_state]
if self.char_current_state.value != current_security_state:
self.char_current_state.set_value(current_security_state)
_LOGGER.debug(
"%s: Updated current state to %s (%d)",
self.entity_id,
hass_state,
current_security_state,
)
// SecuritySystemTargetState does not support triggered
if (
hass_state != STATE_ALARM_TRIGGERED
and self.char_target_state.value != current_security_state
):
self.char_target_state.set_value(current_security_state)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: home-assistant/home-assistant
Commit Name: d6a47cb3e058ca3c10eecc048347ef4e51ae4ebe
Time: 2020-04-15
Author: nick@koston.org
File Name: homeassistant/components/homekit/type_security_systems.py
Class Name: SecuritySystem
Method Name: update_state
Project Name: home-assistant/home-assistant
Commit Name: d6a47cb3e058ca3c10eecc048347ef4e51ae4ebe
Time: 2020-04-15
Author: nick@koston.org
File Name: homeassistant/components/homekit/type_switches.py
Class Name: Valve
Method Name: update_state
Project Name: home-assistant/home-assistant
Commit Name: 5d649b25416d75c31dda8ec227c17e649a3e86d0
Time: 2020-04-12
Author: nick@koston.org
File Name: homeassistant/components/homekit/type_locks.py
Class Name: Lock
Method Name: update_state