Skip to content

Commit

Permalink
Revert "Move 'is_on' customization to Occupancy subclass."
Browse files Browse the repository at this point in the history
This reverts commit d2b6939.

Closes home-assistant/core#121300
  • Loading branch information
jaraco committed Jul 7, 2024
1 parent 62c8f74 commit 54e8350
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jaraco/abode/devices/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def is_on(self):
Assume offline or open (worst case).
"""
if self.type == 'Occupancy':
return self.status not in STATUS.ONLINE
return self.status not in (
STATUS.OFF,
STATUS.OFFLINE,
Expand Down Expand Up @@ -43,9 +45,7 @@ class Motion(BinarySensor):


class Occupancy(BinarySensor):
@property
def is_on(self):
return self.status not in STATUS.ONLINE
pass


class Door(BinarySensor):
Expand Down

0 comments on commit 54e8350

Please sign in to comment.