diff --git a/homeassistant/components/evohome/climate.py b/homeassistant/components/evohome/climate.py index 7022056a7ac6..b505a5c51ebf 100644 --- a/homeassistant/components/evohome/climate.py +++ b/homeassistant/components/evohome/climate.py @@ -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) ) diff --git a/homeassistant/components/evohome/water_heater.py b/homeassistant/components/evohome/water_heater.py index c1a461ed3eab..224d4bc703f4 100644 --- a/homeassistant/components/evohome/water_heater.py +++ b/homeassistant/components/evohome/water_heater.py @@ -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( diff --git a/tests/components/evohome/snapshots/test_climate.ambr b/tests/components/evohome/snapshots/test_climate.ambr index 95c358883ca1..0d10682b2ca6 100644 --- a/tests/components/evohome/snapshots/test_climate.ambr +++ b/tests/components/evohome/snapshots/test_climate.ambr @@ -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')), }), ]) # --- diff --git a/tests/components/evohome/snapshots/test_water_heater.ambr b/tests/components/evohome/snapshots/test_water_heater.ambr index 3b0a114d4e30..39ad0a7a7ce0 100644 --- a/tests/components/evohome/snapshots/test_water_heater.ambr +++ b/tests/components/evohome/snapshots/test_water_heater.ambr @@ -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')), }), ]) # ---