From de9b95903e0716cc7c55973318c6c98adcfec1dd Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Mon, 14 Oct 2024 04:56:12 +0000 Subject: [PATCH] Add testu --- tests/test_overclimate.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_overclimate.py b/tests/test_overclimate.py index 8f2ef83..82fbba0 100644 --- a/tests/test_overclimate.py +++ b/tests/test_overclimate.py @@ -302,6 +302,23 @@ async def test_bug_101( assert entity.target_temperature == 12.75 assert entity.preset_mode is PRESET_NONE + # 4. Change the target temp with < 1 value. The value should not be taken + # Wait 11 sec + event_timestamp = now + timedelta(seconds=11) + await send_climate_change_event_with_temperature( + entity, + HVACMode.HEAT, + HVACMode.HEAT, + HVACAction.OFF, + HVACAction.OFF, + event_timestamp, + 12.5, # 12.75 means 13 in vtherm + True, + "climate.mock_climate", # the underlying climate entity id + ) + assert entity.target_temperature == 12.75 + assert entity.preset_mode is PRESET_NONE + @pytest.mark.parametrize("expected_lingering_timers", [True]) async def test_bug_508(