mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[amazonechocontrol] fix missing time (backport from 3.0) (#10009)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
parent
31a20dc249
commit
72f43bde98
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user