Test with reset of error when changing the target temperature. For @pbranly configuration

This commit is contained in:
Jean-Marc Collin
2023-11-18 11:50:51 +00:00
parent 856f47ce03
commit 7eac10ab3c
2 changed files with 5 additions and 4 deletions

View File

@@ -355,7 +355,7 @@ async def test_over_climate_regulation_limitations(
await send_ext_temperature_change_event(entity, 10, event_timestamp)
# the regulated temperature should be under
assert entity.regulated_target_temp == old_regulated_temp
assert entity.regulated_target_temp <= old_regulated_temp
# change temperature so that dtemp > 0.5 and time is > period_min (+ 3min)
event_timestamp = now - timedelta(minutes=12)
@@ -363,12 +363,12 @@ async def test_over_climate_regulation_limitations(
"custom_components.versatile_thermostat.commons.NowClass.get_now",
return_value=event_timestamp,
):
await send_temperature_change_event(entity, 17, event_timestamp)
await send_temperature_change_event(entity, 16, event_timestamp)
await send_ext_temperature_change_event(entity, 12, event_timestamp)
# the regulated should have been done
assert entity.regulated_target_temp != old_regulated_temp
assert entity.regulated_target_temp > entity.target_temperature
assert entity.regulated_target_temp >= entity.target_temperature
assert (
entity.regulated_target_temp == 17 + 0.5
) # 0.7 without round_to_nearest