I’m using the blockly “datetime” blocks to compare dateTime items wit “now” running OH4.0.2-1
if i do like this, in my opinion these are the most obvious blocks to do so.
the Item is a datTime item!
i get the following error
2023-08-16 21:32:05.750 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'Vorhaus_Motion' failed: org.graalvm.polyglot.PolyglotException: Error: "Abenddeammerung_Startzeit (Type=DateTimeItem, State=2023-08-16T20:17:00.000+0200, Label=Abenddeammerung Start, Category=, Tags=[Point])" is an unsupported type for conversion to time.ZonedDateTime
So i compared some blocks.
console.info((time.toZDT(items.getItem('Abenddeammerung_Startzeit'))));
error
2023-08-16 22:05:13.282 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'AA' failed: org.graalvm.polyglot.PolyglotException: Error: "Abenddeammerung_Startzeit (Type=DateTimeItem, State=2023-08-16T20:17:00.000+0200, Label=Abenddeammerung Start, Category=, Tags=[Point])" is an unsupported type for conversion to time.ZonedDateTime
If i fetch the state like this
console.info((time.toZDT(items.getItem(items.getItem('Abenddeammerung_Startzeit').state))));
i get this error
2023-08-16 21:53:15.898 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'AA' failed: org.openhab.core.items.ItemNotFoundException: Item '2023-08-16T20:17:00.000+0200' could not be found in the item registry
The only blocks working are those
console.info((time.toZDT(items.getItem('Abenddeammerung_Startzeit').state)));
Shouldn’t this block
do this job and fetch the state of the item, or do i miss something?