Skip to content

Commit

Permalink
fix: allow sentry mode to return None
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jul 31, 2020
1 parent 7c44581 commit 8250fca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions teslajsonpy/homeassistant/sentry_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ def available(self):
"""Return whether the sentry mode is available."""
return self.sentry_mode_available

def is_on(self):
"""Return whether the sentry mode is enabled, always False if sentry mode is not available."""
"""Return whether the sentry mode is enabled, or None if sentry mode is not available."""
if not self.sentry_mode_available:
return None
return self.sentry_mode_available and self.__sentry_mode

@staticmethod
Expand Down

0 comments on commit 8250fca

Please sign in to comment.