First to say: my migration to OH3 has been very smooth overall. Thanks for the great work.
I’m only confronted with 1 minor thing no longer working.
I have a rule which calculates a percentage value from a current (mA) value. This is the filling rate of my rain water tank (input in mA, which I then convert to a percentage).
The rule is as following:
Rule "mA into pct" when Item Niveau_regenwaterput changed then val current = triggeringItem.state as Number val a = 0.41 as Number val b = -1.6636 as Number var y = ( a * current + b ) / 2.3 * 100 Niveau_regenwaterput_pct.postUpdate(y) end
Niveau_regenwaterput_pct is defined as a dummy item in a customs.items file:
Number Niveau_regenwaterput_pct "Niveau Regenwaterput [%d %%]" <water> // [%d %%] om percent weer te geven. [%.4f] voor decimal
Also Niveau_regenwaterput is defined as an item and I can see the corresponding value in openhab.
To be clear: the rule does fire in OH3. I have tested it with a light switch, which effectively turns on when the item ‘niveau_regenwaterput’ changes.
Moreover, the above rule worked flawlessly in OH2.5.
Problem is, since mygrating to OH3.0, Niveau_regenwaterput_pct no longer shows a value. It’s as if the caluclation is no longer performed, or the postUpdate is no longer working.