Passing variables to Notify TTS

Hi,

I’m 100% sure this worked before, as I had this setup, but for some reason, it’s not working this time.

So, I have a flow, where once a global variable is adjusted, it’ll send that variable to my phone as a notification and TTS, such as “The wife is home soon, shall I put the kettle on?”

Now, I’ve used the debug node, so I know the payload is reaching the end and getting read
But for some reason, the Call-Service node isn’t detecting it, the notification is blank and the TTS just says “Please set a title to process”, so I’m doing something incorrectly, but I’m not sure.

Here’s my flow, if that helps

Here’s the TTS setup

image

I’m just so confused, as to why I can’t get this to work, like I said, the debug node can see the message payload

image

If I set the title for TTS manually, it works just fine, same with the notification, but it’s just not accepting payloads.

I must be missing something very simple here…Help?

Thanks in advance!

What’s the data field type set to in the call-service node

Not entirely sure I’m aware what you mean by type?

image

If you mean the payload data type (which I think you might be)

It’s set to string
image

Also, realised I’m mixing the screenshots of my TTS node and my mobile notification node… either way, payload isn’t getting recognised

Turns out, this works? Not using “{{Notify}}”, when did this change?

{
   "message": Notify,
   "title" : "Notification"
}

image

You’re attempting to use mustache templates with the data type set to JSONata, J: expression. Mustache templates only work when the data type is set to JSON.

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/call-service.html

1 Like