Skip to content

Commit

Permalink
Add #602 - implement a max_on_percent setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Marc Collin committed Nov 18, 2024
1 parent 5e4cecd commit 9dfdff9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion custom_components/versatile_thermostat/thermostat_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_auto_start_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_overclimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9dfdff9

Please sign in to comment.