Hi All,
I updated von 2.5 to 3.0. Within 2.5 I have following rule in place, which worked liked charme:
rule "Light - Eg_kue_Küchendeckenlicht zeitabhängig dimmen"
when
Item EG_kue_li_decke changed to ON
then
logInfo("Info", "Light - Eg_kue_Küchendeckenlicht zeitabhängig dimmen rule Start")
if ( now.isAfter((Sunrise_Time.state as DateTimeType).zonedDateTime.toInstant().toEpochMilli) || now.isBefore((Sunset_Time.state as DateTimeType).zonedDateTime.toInstant().toEpochMilli)) {
logInfo("Info", "Es ist Tag")
gEG_kue_ZigbeeBulb.members.forEach [ zigkue | sendCommand(zigkue,100) ]
}
After updating to OH3, I get the following error in the log:
[ERROR] [.internal.handler.ScriptActionHandler] - Script execution of rule with UID 'Licht-25' failed: An error occurred during the script execution: Could not invoke method: java.time.chrono.ChronoZonedDateTime.isAfter(java.time.chrono.ChronoZonedDateTime) on instance: 2021-01-30T20:03:16.019011+01:00[Europe/Berlin] in Licht
I have no clue, what is wrong, but I think it could be related to the timezone, which wasn’t included in OH2.5.
Could someone help me here?
Thanks in advance.