From e30cf8845993126a006792270453adcca06bef25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Fri, 9 Apr 2021 12:37:46 +0200 Subject: [PATCH] AEMET town timestamp should be UTC (#48916) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AEMET OpenData doesn't clarify if the hourly data timestamp is UTC or not, but after correctly formatting the town timestamp in ISO format, it is clear that the timestamp is provided as UTC value. Therefore, the only values not provided as UTC are the ones related to the specific daily and hourly forecast values. Signed-off-by: Álvaro Fernández Rojas --- homeassistant/components/aemet/weather_update_coordinator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/aemet/weather_update_coordinator.py b/homeassistant/components/aemet/weather_update_coordinator.py index a7ca0a12422..7aab23488b5 100644 --- a/homeassistant/components/aemet/weather_update_coordinator.py +++ b/homeassistant/components/aemet/weather_update_coordinator.py @@ -239,7 +239,7 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator): return None elaborated = dt_util.parse_datetime( - weather_response.hourly[ATTR_DATA][0][AEMET_ATTR_ELABORATED] + weather_response.hourly[ATTR_DATA][0][AEMET_ATTR_ELABORATED] + "Z" ) now = dt_util.now() now_utc = dt_util.utcnow()