aemet: drop isoformat() from timestamps

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas
2021-12-26 13:10:20 +01:00
parent 08a3140e6c
commit 2260d2156f

View File

@@ -286,7 +286,7 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
temperature_feeling = None temperature_feeling = None
town_id = None town_id = None
town_name = None town_name = None
town_timestamp = dt_util.as_utc(elaborated).isoformat() town_timestamp = dt_util.as_utc(elaborated)
wind_bearing = None wind_bearing = None
wind_max_speed = None wind_max_speed = None
wind_speed = None wind_speed = None
@@ -312,7 +312,7 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
# Overwrite weather values with closest station data (if present) # Overwrite weather values with closest station data (if present)
if station_data: if station_data:
station_timestamp = dt_util.as_utc(station_dt).isoformat() station_timestamp = dt_util.as_utc(station_dt)
if (now_utc - station_dt) <= STATION_MAX_DELTA: if (now_utc - station_dt) <= STATION_MAX_DELTA:
if AEMET_ATTR_STATION_HUMIDITY in station_data: if AEMET_ATTR_STATION_HUMIDITY in station_data:
humidity = format_float(station_data[AEMET_ATTR_STATION_HUMIDITY]) humidity = format_float(station_data[AEMET_ATTR_STATION_HUMIDITY])