mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix Hue motion sensor state if sensor is disabled (#63000)
This commit is contained in:
parent
a8fe9f2eff
commit
f28c66ce19
@ -84,6 +84,9 @@ class HueMotionSensor(HueBinarySensorBase):
|
|||||||
@property
|
@property
|
||||||
def is_on(self) -> bool | None:
|
def is_on(self) -> bool | None:
|
||||||
"""Return true if the binary sensor is on."""
|
"""Return true if the binary sensor is on."""
|
||||||
|
if not self.resource.enabled:
|
||||||
|
# Force None (unknown) if the sensor is set to disabled in Hue
|
||||||
|
return None
|
||||||
return self.resource.motion.motion
|
return self.resource.motion.motion
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user