diff --git a/custom_components/versatile_thermostat/feature_window_manager.py b/custom_components/versatile_thermostat/feature_window_manager.py index 24d809b..6d19cc1 100644 --- a/custom_components/versatile_thermostat/feature_window_manager.py +++ b/custom_components/versatile_thermostat/feature_window_manager.py @@ -44,7 +44,6 @@ class FeatureWindowManager(BaseFeatureManager): { "window_sensor_entity_id", "is_window_configured", - "is_window_bypass", "window_delay_sec", "window_off_delay_sec", "window_auto_configured", @@ -130,6 +129,11 @@ class FeatureWindowManager(BaseFeatureManager): @overrides async def start_listening(self): """Start listening the underlying entity""" + + #Try to get last window bypass state + old_state = await self._vtherm.async_get_last_state() + self._is_window_bypass = True if old_state and old_state.attributes and old_state.attributes.get("is_window_bypass") == True else False + if self._is_configured: self.stop_listening() if self._window_sensor_entity_id: