mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 10:31:39 +02:00
Fix lyric timestamp sensor (#61209)
* Fix lyric timestamp sensor * Update type
This commit is contained in:
@@ -47,7 +47,7 @@ LYRIC_SETPOINT_STATUS_NAMES = {
|
|||||||
class LyricSensorEntityDescription(SensorEntityDescription):
|
class LyricSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Class describing Honeywell Lyric sensor entities."""
|
"""Class describing Honeywell Lyric sensor entities."""
|
||||||
|
|
||||||
value: Callable[[LyricDevice], StateType] = round
|
value: Callable[[LyricDevice], StateType | datetime] = round
|
||||||
|
|
||||||
|
|
||||||
def get_datetime_from_future_time(time: str) -> datetime:
|
def get_datetime_from_future_time(time: str) -> datetime:
|
||||||
@@ -133,7 +133,7 @@ async def async_setup_entry(
|
|||||||
device_class=DEVICE_CLASS_TIMESTAMP,
|
device_class=DEVICE_CLASS_TIMESTAMP,
|
||||||
value=lambda device: get_datetime_from_future_time(
|
value=lambda device: get_datetime_from_future_time(
|
||||||
device.changeableValues.nextPeriodTime
|
device.changeableValues.nextPeriodTime
|
||||||
).isoformat(),
|
),
|
||||||
),
|
),
|
||||||
location,
|
location,
|
||||||
device,
|
device,
|
||||||
|
Reference in New Issue
Block a user