Fix evohome test by setting datetime to match snapshot (#124824)
* initial commit * freeze time instead * use fixture instead of APIpull/124830/head
parent
5f810d908f
commit
3d39f6ce88
|
@ -62,10 +62,10 @@
|
|||
'target_heat_temperature': 17.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': False,
|
||||
|
@ -110,10 +110,10 @@
|
|||
'target_heat_temperature': 17.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -160,10 +160,10 @@
|
|||
'until': '2022-03-07T11:00:00-08:00',
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -205,10 +205,10 @@
|
|||
'target_heat_temperature': 17.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -250,10 +250,10 @@
|
|||
'target_heat_temperature': 16.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -295,10 +295,10 @@
|
|||
'target_heat_temperature': 16.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -340,10 +340,10 @@
|
|||
'target_heat_temperature': 17.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -380,10 +380,10 @@
|
|||
]),
|
||||
'dhw_id': '3933910',
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T22:30:00-07:00',
|
||||
'next_sp_state': 'On',
|
||||
'this_sp_from': '2024-08-14T14:30:00-07:00',
|
||||
'this_sp_state': 'Off',
|
||||
'next_sp_from': '2024-07-10T05:00:00-07:00',
|
||||
'next_sp_state': 'Off',
|
||||
'this_sp_from': '2024-07-10T04:00:00-07:00',
|
||||
'this_sp_state': 'On',
|
||||
}),
|
||||
'state_status': dict({
|
||||
'mode': 'PermanentOverride',
|
||||
|
@ -463,10 +463,10 @@
|
|||
'target_heat_temperature': 21.5,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -546,10 +546,10 @@
|
|||
'target_heat_temperature': 21.5,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T21:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T13:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T12:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-09T22:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -591,10 +591,10 @@
|
|||
'target_heat_temperature': 21.5,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T21:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T13:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T12:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-09T22:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -755,10 +755,10 @@
|
|||
'target_heat_temperature': 17.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T23:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T15:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T14:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-10T00:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
@ -838,10 +838,10 @@
|
|||
'target_heat_temperature': 15.0,
|
||||
}),
|
||||
'setpoints': dict({
|
||||
'next_sp_from': '2024-08-14T22:00:00-07:00',
|
||||
'next_sp_temp': 18.1,
|
||||
'this_sp_from': '2024-08-14T14:00:00-07:00',
|
||||
'this_sp_temp': 15.9,
|
||||
'next_sp_from': '2024-07-10T13:10:00-07:00',
|
||||
'next_sp_temp': 18.6,
|
||||
'this_sp_from': '2024-07-09T23:00:00-07:00',
|
||||
'this_sp_temp': 16.0,
|
||||
}),
|
||||
'temperature_status': dict({
|
||||
'is_available': True,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
import pytest
|
||||
from syrupy import SnapshotAssertion
|
||||
|
||||
|
@ -17,9 +18,13 @@ async def test_entities(
|
|||
evo_config: dict[str, str],
|
||||
install: str,
|
||||
snapshot: SnapshotAssertion,
|
||||
freezer: FrozenDateTimeFactory,
|
||||
) -> None:
|
||||
"""Test entities and state after setup of a Honeywell TCC-compatible system."""
|
||||
|
||||
# some extended state attrs are relative the current time
|
||||
freezer.move_to("2024-07-10 12:00:00+00:00")
|
||||
|
||||
await setup_evohome(hass, evo_config, install=install)
|
||||
|
||||
assert hass.states.async_all() == snapshot
|
||||
|
|
Loading…
Reference in New Issue