How to apply a Regex filter to incoming MQTT (version 2) messages?

In the old version of the MQTT binding, when I created items I could apply a regex filter to incoming MQTT messages and ignore those that were not relevant:

{mqtt="<[Mosquitto:tele/Snf07/SENSOR:state:JSONPATH($.AM2301.Temperature):.*Temperature.*]"}

I’ve re-done my whole setup with the new MQTT binging using PaperUI. How can I add that filter to ensure that (in this example) non-‘Temperature’ messages are ignored by a particular item?

Cheers to anyone who can help.

  • Andrew

This is a tasmota sonoff, correct?
Then you don’t need the regex because the JSONPATH transform pull the value of temperature only out of the json for you

But for answering just the topic “regex a mqtt2 message” see: