-
Platform information:
I am running Openhabian 4.0.3 on Raspberry Pi 4 8GB
I have a simple blockly script where I change the value of an item and then save it to a Variable.
One would expect to see the number 5 in the logs.
Instead i get 7 (which is the previous value of the item).
2023-09-17 11:27:21.908 [INFO ] [nhab.automation.script.ui.5ae1688421] - Script Started
2023-09-17 11:27:21.911 [INFO ] [nhab.automation.script.ui.5ae1688421] - 7
==> /var/log/openhab/events.log <==
2023-09-17 11:27:21.911 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TestNumberItem' received command 5
2023-09-17 11:27:21.913 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TestNumberItem' received command 7
2023-09-17 11:27:21.914 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestNumberItem' changed from 7 to 5
2023-09-17 11:27:21.917 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestNumberItem' changed from 5 to 7
Now if i put a small delay after sending a new value to the items the script works correctly.
2023-09-17 11:30:46.750 [INFO ] [nhab.automation.script.ui.5ae1688421] - Script Started
==> /var/log/openhab/events.log <==
2023-09-17 11:30:46.752 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TestNumberItem' received command 5
2023-09-17 11:30:46.754 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestNumberItem' changed from 7 to 5
==> /var/log/openhab/openhab.log <==
2023-09-17 11:30:47.753 [INFO ] [nhab.automation.script.ui.5ae1688421] - 5
==> /var/log/openhab/events.log <==
2023-09-17 11:30:47.755 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TestNumberItem' received command 7
2023-09-17 11:30:47.757 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestNumberItem' changed from 5 to 7
Any ideas?