From 512e3b239bf4323be89f288f3025484e4028b202 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sun, 24 Nov 2024 23:25:27 +0100 Subject: [PATCH] Simplify DateTimeType handling for Solax Signed-off-by: Jacob Laursen --- .../internal/handlers/SolaxLocalAccessChargerHandler.java | 3 +-- .../internal/handlers/SolaxLocalAccessInverterHandler.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessChargerHandler.java b/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessChargerHandler.java index 5609c4318a6..16d04e1771a 100644 --- a/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessChargerHandler.java +++ b/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessChargerHandler.java @@ -12,7 +12,6 @@ */ package org.openhab.binding.solax.internal.handlers; -import java.time.ZonedDateTime; import java.util.Set; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -124,6 +123,6 @@ public class SolaxLocalAccessChargerHandler extends SolaxLocalAccessAbstractHand SIUnits.CELSIUS, supportedChannels); // Binding provided data - updateState(SolaxBindingConstants.CHANNEL_TIMESTAMP, new DateTimeType(ZonedDateTime.now())); + updateState(SolaxBindingConstants.CHANNEL_TIMESTAMP, new DateTimeType()); } } diff --git a/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessInverterHandler.java b/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessInverterHandler.java index b496cc09a67..284d868e8a1 100644 --- a/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessInverterHandler.java +++ b/bundles/org.openhab.binding.solax/src/main/java/org/openhab/binding/solax/internal/handlers/SolaxLocalAccessInverterHandler.java @@ -12,7 +12,6 @@ */ package org.openhab.binding.solax.internal.handlers; -import java.time.ZonedDateTime; import java.util.Set; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -194,6 +193,6 @@ public class SolaxLocalAccessInverterHandler extends SolaxLocalAccessAbstractHan Units.HERTZ, supportedChannels); // Binding provided data - updateState(SolaxBindingConstants.CHANNEL_TIMESTAMP, new DateTimeType(ZonedDateTime.now())); + updateState(SolaxBindingConstants.CHANNEL_TIMESTAMP, new DateTimeType()); } }