Event Based Trigger Issues After 3.4.x upgrade

I think there could be a bug with event triggers using changed to/from a specific value post the UoM changes.

Item <item> changed [from <state>] [to <state>]

The below rules no longer work I can see in my events.log that previously these had no ‘W’ UoM but now do. Is there a way to specify UoM in the changed to/from trigger (tried |W but not valid syntax)

rule “WashingMachineFinished”
Item Utility_Energy_WashingMachineSocket_Watts changed to 0

rule “WashingMachineActive”
Item Utility_Energy_WashingMachineSocket_Watts changed from 0

This isn’t a bug. You cannot trigger upon UoM but constants only

No. Trigger upon “changed” (with no value) and do the further processing inside the rule.

I think this should work.

First try changed from 0 W. If that doesn’t work, file an issue on openhab-core. We can use UoM in conditions (and in fact we’ll get a warning if you don’t and the Item is using UoM. It should work in triggers too.

1 Like

Thanks for the pointer @rlkoshak the state needed to be in quotes but from some initial testing changed from '0 W' seems to be working.

Without quotes gives extraneous input ‘W’ expecting ‘then’

I stand corrected. You’re never done learning.