From b7539fc0de0cede0fce7918205566dc0123d13fc Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen <balloob@gmail.com> Date: Tue, 7 Dec 2021 23:39:27 -0800 Subject: [PATCH] Fix islamic prayer times timestamp sensor (#61207) --- homeassistant/components/islamic_prayer_times/sensor.py | 6 ++---- tests/components/islamic_prayer_times/test_config_flow.py | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/islamic_prayer_times/sensor.py b/homeassistant/components/islamic_prayer_times/sensor.py index 99cc65bb548..38a95fb803b 100644 --- a/homeassistant/components/islamic_prayer_times/sensor.py +++ b/homeassistant/components/islamic_prayer_times/sensor.py @@ -45,10 +45,8 @@ class IslamicPrayerTimeSensor(SensorEntity): @property def native_value(self): """Return the state of the sensor.""" - return ( - self.client.prayer_times_info.get(self.sensor_type) - .astimezone(dt_util.UTC) - .isoformat() + return self.client.prayer_times_info.get(self.sensor_type).astimezone( + dt_util.UTC ) async def async_added_to_hass(self): diff --git a/tests/components/islamic_prayer_times/test_config_flow.py b/tests/components/islamic_prayer_times/test_config_flow.py index 842a877e292..18d64842c65 100644 --- a/tests/components/islamic_prayer_times/test_config_flow.py +++ b/tests/components/islamic_prayer_times/test_config_flow.py @@ -5,6 +5,7 @@ import pytest from homeassistant import config_entries, data_entry_flow from homeassistant.components import islamic_prayer_times +from homeassistant.components.islamic_prayer_times import config_flow # noqa: F401 from homeassistant.components.islamic_prayer_times.const import CONF_CALC_METHOD, DOMAIN from tests.common import MockConfigEntry