mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Let evohome-async convert an evohome until to UTC (#190045)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -194,8 +194,6 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||
else:
|
||||
until = dt_util.utcnow() + duration
|
||||
|
||||
until = dt_util.as_utc(until) if until else None
|
||||
|
||||
await self.coordinator.call_client_api(
|
||||
self._evo_device.set_temperature(temperature, until=until)
|
||||
)
|
||||
@@ -263,7 +261,6 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||
await self.coordinator.async_ensure_schedule(self._evo_device)
|
||||
until = self.setpoints.get(NEXT_SP_FROM)
|
||||
|
||||
until = dt_util.as_utc(until) if until else None
|
||||
await self.coordinator.call_client_api(
|
||||
self._evo_device.set_temperature(temperature, until=until)
|
||||
)
|
||||
@@ -311,7 +308,6 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||
temperature = self._evo_device.target_heat_temperature
|
||||
assert temperature is not None # mypy check
|
||||
|
||||
until = dt_util.as_utc(until) if until else None
|
||||
await self.coordinator.call_client_api(
|
||||
self._evo_device.set_temperature(temperature, until=until)
|
||||
)
|
||||
|
||||
@@ -111,8 +111,6 @@ class EvoDHW(EvoChild, WaterHeaterEntity):
|
||||
else:
|
||||
until = dt_util.utcnow() + duration
|
||||
|
||||
until = dt_util.as_utc(until) if until else None
|
||||
|
||||
if state:
|
||||
await self.coordinator.call_client_api(self._evo_device.set_on(until=until))
|
||||
else:
|
||||
@@ -147,7 +145,6 @@ class EvoDHW(EvoChild, WaterHeaterEntity):
|
||||
else:
|
||||
await self.coordinator.async_ensure_schedule(self._evo_device)
|
||||
until = self.setpoints.get(NEXT_SP_FROM)
|
||||
until = dt_util.as_utc(until) if until else None
|
||||
|
||||
if operation_mode == STATE_ON:
|
||||
await self.coordinator.call_client_api(
|
||||
|
||||
@@ -2676,7 +2676,7 @@
|
||||
17.0,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2689,7 +2689,7 @@
|
||||
21.5,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2702,7 +2702,7 @@
|
||||
21.5,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 19, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2728,7 +2728,7 @@
|
||||
5.0,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 20, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2741,7 +2741,7 @@
|
||||
17.0,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2754,7 +2754,7 @@
|
||||
15.0,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 20, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2767,28 +2767,28 @@
|
||||
14.0,
|
||||
),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 20, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_zone_set_temperature[default]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_zone_set_temperature[h032585]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_zone_set_temperature[h099625]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 19, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2802,14 +2802,14 @@
|
||||
# name: test_zone_set_temperature[h157546]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 20, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_zone_set_temperature[minimal]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 21, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
@@ -2823,7 +2823,7 @@
|
||||
# name: test_zone_set_temperature[sys_006]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 20, 10, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 22, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
|
||||
@@ -92,30 +92,30 @@
|
||||
# name: test_set_operation_mode[botched]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 12, 30, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 8, 30, tzinfo=zoneinfo.ZoneInfo(key='America/Santiago')),
|
||||
}),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 12, 30, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 8, 30, tzinfo=zoneinfo.ZoneInfo(key='America/Santiago')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_set_operation_mode[default]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 12, 0, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 13, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 12, 0, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 13, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
# name: test_set_operation_mode[sys_006]
|
||||
list([
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 14, 30, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 16, 30, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')),
|
||||
}),
|
||||
dict({
|
||||
'until': HAFakeDatetime(2024, 7, 10, 14, 30, tzinfo=datetime.timezone.utc),
|
||||
'until': HAFakeDatetime(2024, 7, 10, 16, 30, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')),
|
||||
}),
|
||||
])
|
||||
# ---
|
||||
|
||||
Reference in New Issue
Block a user