From 54e83501b5d4fdcd6d76e925472209b31971f08d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Jul 2024 14:34:39 -0400 Subject: [PATCH] Revert "Move 'is_on' customization to Occupancy subclass." This reverts commit d2b69390ed97a006b05879bc6e5db076ca85369f. Closes home-assistant/core#121300 --- jaraco/abode/devices/binary_sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jaraco/abode/devices/binary_sensor.py b/jaraco/abode/devices/binary_sensor.py index e9c6de1..39e046d 100644 --- a/jaraco/abode/devices/binary_sensor.py +++ b/jaraco/abode/devices/binary_sensor.py @@ -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, @@ -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):