Add bypass to the window open check and correct description (#897)

This commit is contained in:
adi90x
2025-02-10 17:42:06 +01:00
committed by GitHub
parent 313fa26160
commit 1576e9c189

View File

@@ -508,10 +508,10 @@ class FeatureWindowManager(BaseFeatureManager):
@property @property
def is_window_detected(self) -> bool: def is_window_detected(self) -> bool:
"""Return true if the presence is configured and presence sensor is OFF""" """Return true if the window is configured and open and bypass is not ON"""
return self._is_configured and ( return self._is_configured and (
self._window_state == STATE_ON or self._window_auto_state == STATE_ON self._window_state == STATE_ON or self._window_auto_state == STATE_ON
) ) and not self._is_window_bypass
@property @property
def window_sensor_entity_id(self) -> bool: def window_sensor_entity_id(self) -> bool: