Fix Islamic prayer sensor timestamp format (#35243)

This commit is contained in:
Rami Mosleh authored and Paulus Schoutsen committed 2020-05-07 11:50:16 -07:00
1 parent 00282dab72
commit 97d66c4eb2
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()
@@ -2,6 +2,7 @@
from unittest.mock import patch
from homeassistant.components import islamic_prayer_times
import homeassistant.util.dt as dt_util
from . import NOW, PRAYER_TIMES, PRAYER_TIMES_TIMESTAMPS
@@ -26,5 +27,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()
)