I Think i have found the sollution.
When you create a rule with blockly and trie to compare two item values, for example:
then openhab compares the pointers towards the values and not the values them self. This is an issue wich should be fixed.
To solfe this problem you can switch to the javascript view. you should see this:
if (itemRegistry.getItem('WzPreBri').getState() == itemRegistry.getItem('LiBri').getState())
{
events.sendCommand('MyItem', 'something awesome');
}
now you have to openhab to use the value and not the pointer.
in my case the values are integer type but this also works for other types.
The magic word is “parse…()” in my case “parseInt()”
in my case i have to change the first line to:
if (parseInt(itemRegistry.getItem('WzPreBri').getState()) == parseInt(itemRegistry.getItem('LiBri').getState()))
i hope this will help if someone has a simiular problem.
