mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Fix AEMET town timestamp format (#48647)
Datetime should be converted to ISO format. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
cee43b0670
commit
2c61c0f258
@ -283,7 +283,7 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
|
||||
temperature_feeling = None
|
||||
town_id = None
|
||||
town_name = None
|
||||
town_timestamp = dt_util.as_utc(elaborated)
|
||||
town_timestamp = dt_util.as_utc(elaborated).isoformat()
|
||||
wind_bearing = None
|
||||
wind_max_speed = None
|
||||
wind_speed = None
|
||||
|
@ -127,7 +127,7 @@ async def test_aemet_weather_create_sensors(hass):
|
||||
assert state.state == "Getafe"
|
||||
|
||||
state = hass.states.get("sensor.aemet_town_timestamp")
|
||||
assert state.state == "2021-01-09 11:47:45+00:00"
|
||||
assert state.state == "2021-01-09T11:47:45+00:00"
|
||||
|
||||
state = hass.states.get("sensor.aemet_wind_bearing")
|
||||
assert state.state == "90.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user