Using MQTT payload - even if existing value of item

using openHAB3.2 and I’d like to use the MQTT payload coming to an item - even though, the payload is the already existing value of the item:

e.g.: Item.state == 20°C and MQTT payload sends 20°C:

  • trigger: item received command => doesn’t fire
  • trigger: when channel was triggered => does fire, but I don’t know how to get the trigger in the rule

tried it with: triggeringItem.state

2022-04-17 20:03:46.635 [INFO ] [openhab.event.ChannelTriggeredEvent ] - mqtt:topic:synology:temp:test triggered 20
2022-04-17 20:03:47.468 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'TempTest' failed: cannot invoke method public abstract org.openhab.core.types.State org.openhab.core.items.Item.getState() on null

Can I somehow use the triggered value in a rule?

Use received update when you want to always trigger on a value being sent.

…ok, I swear I tried that and failed! :wink:
now it works! Thanks!

1 Like

That’s funny. I figured you had just forgotten since you’ve been around here far longer than I have! I do that all of the time.

Yeah, sometimes my thinking is … funny. :stuck_out_tongue_winking_eye:

1 Like