Skip to content

Commit

Permalink
fix(29): Add input states for tamper & inhibited
Browse files Browse the repository at this point in the history
  • Loading branch information
jouwdan committed Sep 2, 2024
1 parent fe3aa32 commit 4e16427
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/hkc_alarm/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ def state(self):
f"Sensor {self.name} state determined as 'Open' due to inputState being 1."
)
return "Open"
elif self._input_data["inputState"] == 2:
_logger.debug(
f"Sensor {self.name} state determined as 'Tamper' due to inputState being 2."
)
return "Tamper"
elif self._input_data["inputState"] == 5:
_logger.debug(
f"Sensor {self.name} state determined as 'Inhibited' due to inputState being 5."
)
return "Inhibited"
else:
_logger.debug(f"Sensor {self.name} state determined as 'Closed'.")
return "Closed"
Expand Down

0 comments on commit 4e16427

Please sign in to comment.