From 72f43bde982eafe688ec757229fd910fb3b1e874 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sun, 31 Jan 2021 22:14:01 +0100 Subject: [PATCH] [amazonechocontrol] fix missing time (backport from 3.0) (#10009) Signed-off-by: Jan N. Klug --- .../amazonechocontrol/internal/handler/EchoHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/handler/EchoHandler.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/handler/EchoHandler.java index 559b6b9e351..48116d017ed 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/handler/EchoHandler.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/handler/EchoHandler.java @@ -1279,8 +1279,8 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler { if (StringUtils.equals(notification.status, "ON")) { if ("Reminder".equals(notification.type)) { String offset = ZoneId.systemDefault().getRules().getOffset(Instant.now()).toString(); - ZonedDateTime alarmTime = ZonedDateTime - .parse(notification.originalDate + "T" + notification.originalTime + offset); + String time = Objects.requireNonNullElse(notification.originalTime, "00:00:00"); + ZonedDateTime alarmTime = ZonedDateTime.parse(notification.originalDate + "T" + time + offset); if (StringUtils.isNotBlank(notification.recurringPattern) && alarmTime.isBefore(now)) { continue; // Ignore recurring entry if alarm time is before now }