mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix flipr timestamp sensor (#61203)
This commit is contained in:
parent
fa75c1f92f
commit
113a850c69
@ -1,8 +1,6 @@
|
|||||||
"""Sensor platform for the Flipr's pool_sensor."""
|
"""Sensor platform for the Flipr's pool_sensor."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_TEMPERATURE,
|
||||||
@ -60,7 +58,4 @@ class FliprSensor(FliprEntity, SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""State of the sensor."""
|
"""State of the sensor."""
|
||||||
state = self.coordinator.data[self.entity_description.key]
|
return self.coordinator.data[self.entity_description.key]
|
||||||
if isinstance(state, datetime):
|
|
||||||
return state.isoformat()
|
|
||||||
return state
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user