The flow I have watches all state_changed events and sends the payload to a switch. The switch filters out events based upon a custom attribute defined for various entities in HA.
My goal is to convert msg.payload from “sensor.whatever” to just “whatever”.
JSONata syntax should work if I use $substringAfter(str, chars)
but I’m getting stuck on the data required in the str
position.
I’ve tried $substringAfter(payload,".")
but I get an error despite this testing correctly in other JSONata tools.
Not sure if I need to use payload
or {{payload}}
or ??? Any ideas?