Fix Islamic prayer sensor timestamp format (#35243)

This commit is contained in:
Rami Mosleh authored and GitHub committed 2020-05-06 15:17:40 +02:00
1 parent 1b3f9254bc
commit 35d8890f4e
4 files changed
+11 -5

No files matched your search

@@ -42,4 +42,4 @@ NEW_PRAYER_TIMES_TIMESTAMPS = {
"Midnight": datetime(2020, 1, 1, 00, 43, 0),
}
NOW = datetime(2020, 1, 1, 00, 00, 0)
NOW = datetime(2020, 1, 1, 00, 00, 0).astimezone()
@@ -1,5 +1,6 @@
"""The tests for the Islamic prayer times sensor platform."""
from homeassistant.components import islamic_prayer_times
import homeassistant.util.dt as dt_util
from . import NOW, PRAYER_TIMES, PRAYER_TIMES_TIMESTAMPS
@@ -25,5 +26,5 @@ async def test_islamic_prayer_times_sensors(hass):
hass.states.get(
f"sensor.{prayer}_{islamic_prayer_times.const.SENSOR_TYPES[prayer]}"
).state
== PRAYER_TIMES_TIMESTAMPS[prayer].isoformat()
== PRAYER_TIMES_TIMESTAMPS[prayer].astimezone(dt_util.UTC).isoformat()
)