Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
disable setting alarm state to existing state
Browse files Browse the repository at this point in the history
  • Loading branch information
rlippmann committed Oct 8, 2023
1 parent b96f14a commit ab94051
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/adtpulse/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ async def _perform_alarm_action(
self, arm_disarm_func: Coroutine[bool | None, None, bool], action: str
) -> None:
LOG.debug("%s: Setting Alarm to %s", ADTPULSE_DOMAIN, action)
if self.state == action:
LOG.warning("Attempting to set alarm to same state, ignoring")
return
if action == STATE_ALARM_DISARMED:
self._assumed_state = STATE_ALARM_DISARMING
else:
Expand Down

0 comments on commit ab94051

Please sign in to comment.