From 271b798dc9de5e2a6d853d8f0019c049e2f4491f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 7 Dec 2021 22:46:45 -0800 Subject: [PATCH] Fix lyric timestamp sensor (#61209) * Fix lyric timestamp sensor * Update type --- homeassistant/components/lyric/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/lyric/sensor.py b/homeassistant/components/lyric/sensor.py index 6f550813ad8..be156594524 100644 --- a/homeassistant/components/lyric/sensor.py +++ b/homeassistant/components/lyric/sensor.py @@ -47,7 +47,7 @@ LYRIC_SETPOINT_STATUS_NAMES = { class LyricSensorEntityDescription(SensorEntityDescription): """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: @@ -133,7 +133,7 @@ async def async_setup_entry( device_class=DEVICE_CLASS_TIMESTAMP, value=lambda device: get_datetime_from_future_time( device.changeableValues.nextPeriodTime - ).isoformat(), + ), ), location, device,