Skip to content

Commit

Permalink
Merge pull request #16 from bvis/main
Browse files Browse the repository at this point in the history
fix: Added 'A' protomResponse status to STATE_ALARM_ARMED_CUSTOM_BYPA…
  • Loading branch information
guerrerotook authored Jan 9, 2022
2 parents 9b0b43a + 96c2e80 commit ca1ee92
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions custom_components/securitas/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
)
add_entities(alarms)


def set_arm_state(state, code=None):
"""Send set arm state command."""
# hub.session.api_call(state)
_LOGGER.error("Securitas: esternal set arm state %s", state)
# sleep(2)
# hub.update_overview(no_throttle=True)


class SecuritasAlarm(alarm.AlarmControlPanelEntity):
"""Representation of a Securitas alarm status."""

Expand Down Expand Up @@ -226,9 +217,10 @@ def update_status_alarm(self, status: CheckAlarmStatus = None):
elif status.protomResponse == "P":
self._state = STATE_ALARM_ARMED_HOME
elif (
status.protomResponse == "E"
or status.protomResponse == "B"
or status.protomResponse == "C"
status.protomResponse == "E" # PERI
or status.protomResponse == "B" # PERI + ARMED_HOME
or status.protomResponse == "C" # PERI + ARMED_NIGHT
or status.protomResponse == "A" # PERI + ARMED_AWAY
):
self._state = STATE_ALARM_ARMED_CUSTOM_BYPASS

Expand Down

0 comments on commit ca1ee92

Please sign in to comment.