Skip to content

Commit

Permalink
Merge pull request #30 from mattsaxon/issue#19
Browse files Browse the repository at this point in the history
Fix issue #19
  • Loading branch information
tahvane1 authored Feb 1, 2022
2 parents b6fd846 + 8d56f3b commit 51e11c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/jablotron80/jablotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,11 @@ def _device_tampered(self,source: bytes) -> None:
for zone in self._zones.values():
zone.tamper()
else:
self._get_zone_via_object(device).tamper(device)
zone = self._get_zone_via_object(device)
if zone is not None:
zone.tamper(device)
else:
LOGGER.info("Tampered device not configured in Home Assistant")

def _device_battery_low(self,source: bytes) -> None:
device = self.get_device(source)
Expand Down

0 comments on commit 51e11c9

Please sign in to comment.