Two transformations in one channel possible?

I have some things reading with transformation JSONPATH values.

Sadly I have incorrect values to filter in json.

How is the syntax to combine JS and JSONPATH in one transformation, if that’s possible?

Something like

transformationPattern=„Js:script.js, JSONPATH.$.xxx“

Would that work?

Which binding?

Assuming MQTT, chaining transforms is noted in this section.

Yes, MQTT.

I noticed that page, but oversaw the only line nearly match my question.

         Type switch        : power        [ stateTopic="stat/bedroom1-switch/RESULT", transformationPattern="REGEX:(.*POWER.*)∩JSONPATH:$.POWER", commandTopic="cmnd/bedroom1-switch/POWER" ]

How do I get those letter between REGEX and JSON? In my case I believe I would need to exchange REGEX: Transformation with JS Transformation and this should be the solution, right?

Now testing. Important: In combination with JS the JSONPATH needs to be the first one!

If that will work, thanks a lot!

Simplest solution: Copy & Paste :smile:
There even is a small text in the UI (nearby the text input for transformation) with the special symbol.
Screenshot_20230218_221533

You can try to use Alt+2229 but to be honest, it never worked for me.
Another option would be to use the charmap (Zeichentabelle in german) and to search for Unicode groups->mathematical operators or search directly for intersection (or in german “Durchschnitt” (wrong - would be Ø for average value) but at least the symbol ∩ is correct. The symbol is “Schnittmenge” in german, Windows doesn’t know about that…)

1 Like

Well, copy paste on iPhone did it. Using Ubuntu over ssh for text configuration only. :joy:, should have said that.

Works now, thanks

Ah. Ubuntu:
left ctrl+shift+u, release, then 2229 should do the trick.
Another option should be Alt+2229 (Number block).

Did’nt check this myself, though.