Hi,
i go mad with a rule which is not acting!
i try to convert a timestamp to a normal date string, when this timestamp is changed.
To check the conversation I want to trigger the rule with a switch:
rule "Konvertiere Ladedatum"
when
Item Ladelog changed from OFF to ON
then
var String date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new java.util.Date(((LastChargeDate.state as DecimalType) * 1000).longValue))
LastChargeDateTime.postUpdate(date)
logInfo("LastChargeDate:", LastChargeDateTime)
end
I can see in the event-log that the value of “Ladelog” is changed:
2023-01-06 11:58:37.391 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Ladelog' received command ON
2023-01-06 11:58:37.392 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Ladelog' predicted to become ON
2023-01-06 11:58:37.396 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Ladelog' changed from OFF to ON
But the rule is not fired! To check this I added the loginfo.
Any ideas?