From 698939cf46b1ed09783cd513dbecc59292bb4589 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sun, 10 Nov 2024 00:33:11 +0100 Subject: [PATCH] Simplify DateTimeType handling for Flume Signed-off-by: Jacob Laursen --- .../binding/flume/internal/handler/FlumeDeviceHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.flume/src/main/java/org/openhab/binding/flume/internal/handler/FlumeDeviceHandler.java b/bundles/org.openhab.binding.flume/src/main/java/org/openhab/binding/flume/internal/handler/FlumeDeviceHandler.java index 5933d1e38af..5e10c2277d6 100644 --- a/bundles/org.openhab.binding.flume/src/main/java/org/openhab/binding/flume/internal/handler/FlumeDeviceHandler.java +++ b/bundles/org.openhab.binding.flume/src/main/java/org/openhab/binding/flume/internal/handler/FlumeDeviceHandler.java @@ -20,7 +20,6 @@ import java.time.Duration; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -193,8 +192,7 @@ public class FlumeDeviceHandler extends BaseThingHandler { updateState(CHANNEL_DEVICE_LOWBATTERY, (percent <= 25) ? OnOffType.ON : OnOffType.OFF); break; case CHANNEL_DEVICE_LASTSEEN: - updateState(CHANNEL_DEVICE_LASTSEEN, - new DateTimeType(ZonedDateTime.ofInstant(apiDevice.lastSeen, ZoneId.systemDefault()))); + updateState(CHANNEL_DEVICE_LASTSEEN, new DateTimeType(apiDevice.lastSeen)); break; } }