Fix islamic prayer times timestamp sensor (#61207)
parent
7b3a7ee2d1
commit
b7539fc0de
|
@ -45,10 +45,8 @@ class IslamicPrayerTimeSensor(SensorEntity):
|
||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
return (
|
return self.client.prayer_times_info.get(self.sensor_type).astimezone(
|
||||||
self.client.prayer_times_info.get(self.sensor_type)
|
dt_util.UTC
|
||||||
.astimezone(dt_util.UTC)
|
|
||||||
.isoformat()
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_added_to_hass(self):
|
async def async_added_to_hass(self):
|
||||||
|
|
|
@ -5,6 +5,7 @@ import pytest
|
||||||
|
|
||||||
from homeassistant import config_entries, data_entry_flow
|
from homeassistant import config_entries, data_entry_flow
|
||||||
from homeassistant.components import islamic_prayer_times
|
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 homeassistant.components.islamic_prayer_times.const import CONF_CALC_METHOD, DOMAIN
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
|
|
Loading…
Reference in New Issue