From d001636a5f6aa52796693417936fe8786f281234 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sat, 16 Nov 2024 00:04:16 +0100 Subject: [PATCH] Simplify DateTimeType handling for Millheat Signed-off-by: Jacob Laursen --- .../millheat/internal/handler/MillheatAccountHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.millheat/src/main/java/org/openhab/binding/millheat/internal/handler/MillheatAccountHandler.java b/bundles/org.openhab.binding.millheat/src/main/java/org/openhab/binding/millheat/internal/handler/MillheatAccountHandler.java index ef8620d6219..4fe58535fc4 100644 --- a/bundles/org.openhab.binding.millheat/src/main/java/org/openhab/binding/millheat/internal/handler/MillheatAccountHandler.java +++ b/bundles/org.openhab.binding.millheat/src/main/java/org/openhab/binding/millheat/internal/handler/MillheatAccountHandler.java @@ -420,7 +420,7 @@ public class MillheatAccountHandler extends BaseBridgeHandler { try { switch (property) { case SetHolidayParameterRequest.PROP_START: { - long epoch = ((DateTimeType) command).getZonedDateTime().toEpochSecond(); + long epoch = ((DateTimeType) command).getInstant().getEpochSecond(); SetHolidayParameterRequest req = new SetHolidayParameterRequest(home.getId(), home.getTimezone(), SetHolidayParameterRequest.PROP_START, epoch); if (sendLoggedInRequest(req, SetHolidayParameterResponse.class).isSuccess()) { @@ -429,7 +429,7 @@ public class MillheatAccountHandler extends BaseBridgeHandler { break; } case SetHolidayParameterRequest.PROP_END: { - long epoch = ((DateTimeType) command).getZonedDateTime().toEpochSecond(); + long epoch = ((DateTimeType) command).getInstant().getEpochSecond(); SetHolidayParameterRequest req = new SetHolidayParameterRequest(home.getId(), home.getTimezone(), SetHolidayParameterRequest.PROP_END, epoch); if (sendLoggedInRequest(req, SetHolidayParameterResponse.class).isSuccess()) {