Struggling with data expression

I am using the injection node, with a msg.device set to "Fridge"

If I pass it straight to the debug node, it works as expected.

I'm trying to pass it to a Home Assistant call service node, and have it push the string "Fridge left open".

I can't quite get the handle of how to leverage strings passed along in the flow, and google is failing me, likely due to the fact that I'm not quite sure what to search for :slight_smile: Would really appreciate an assist.

P.S. What I described is a test, long term I will be passing several Call States into the same notification node and want the notification to list the device that has been open for more than x minutes.

Try

{
"message": $$.device & " left open"
}

Brilliant! That did the trick. Thank you.

On the longer run, you may want to use https://try.jsonata.org/ . When struggling (I guess like 99% of us :slight_smile: ) with jsonata syntax, I am using this site for trial and error.
On the left you put the json you want. On the right, the jsonata and the result.

1 Like