diff --git a/custom_components/versatile_thermostat/thermostat_climate.py b/custom_components/versatile_thermostat/thermostat_climate.py index 993831c..5ad134e 100644 --- a/custom_components/versatile_thermostat/thermostat_climate.py +++ b/custom_components/versatile_thermostat/thermostat_climate.py @@ -921,7 +921,10 @@ async def check_auto_start_stop(self): # Stop here return False - elif action == AUTO_START_STOP_ACTION_ON: + elif ( + action == AUTO_START_STOP_ACTION_ON + and self.hvac_off_reason == HVAC_OFF_REASON_AUTO_START_STOP + ): _LOGGER.info( "%s - Turning ON the Vtherm due to auto-start-stop conditions", self ) diff --git a/tests/test_auto_start_stop.py b/tests/test_auto_start_stop.py index f36fe47..87d16e4 100644 --- a/tests/test_auto_start_stop.py +++ b/tests/test_auto_start_stop.py @@ -1401,7 +1401,7 @@ async def test_auto_start_stop_fast_heat_window_mixed( assert vtherm.hvac_off_reason == HVAC_OFF_REASON_WINDOW_DETECTION assert vtherm._saved_hvac_mode == HVACMode.HEAT - assert mock_send_event.call_count == 2 + assert mock_send_event.call_count == 1 assert vtherm.window_state == STATE_ON diff --git a/tests/test_overclimate.py b/tests/test_overclimate.py index c5a1a5a..8026daf 100644 --- a/tests/test_overclimate.py +++ b/tests/test_overclimate.py @@ -972,7 +972,7 @@ async def test_manual_hvac_off_should_take_the_lead_over_window( assert vtherm.hvac_off_reason == HVAC_OFF_REASON_WINDOW_DETECTION assert vtherm._saved_hvac_mode == HVACMode.HEAT - assert mock_send_event.call_count == 2 + assert mock_send_event.call_count == 1 assert vtherm.window_state == STATE_ON