Passing templates to notify service is deprecated and will be removed in 2021.12. (sending notification from node red)(solved)

hello I have been using this to send notifications from node red for quite some time now and its working, but after the last update I get this warning

“Passing templates to notify service is deprecated and will be removed in 2021.12. Automations and scripts handle templates automatically”

Call service node.
Domain: notify
Service: mobile_app_g8441
data: { “message”:‘opened at {{ now().strftime("%H:%M") }}’, “title”: ‘Door’}

I have been googling around and I cant find a different way of doing things anyone have any ideas to share?? thank you

I have the same issue with Node Red, i cannot reproduce when using developer tools though.

If it’s only the time you want to pass along then you could just evaluate the time in Node red and pass it as a clean message.
I assume the way you wrote the line means Node red has to ask HA what time it is, then send it back to Node red, and then Node red sends the message to HA to be carried out.

You can use sensor.time or a format node to get the time.

That seems to be an issue with NR.

Using templates in notify per-se is deprecated because, when you do a call within HA, the “data” of the service call (which can be templates) are resolved, so templates never reach the notify service itself.

Not sure how NR behaves to bypass that step, but it’s worth opening an issue.

ahh ok I think I understand, I thought it was the way I was using to pass the data that was the issue not, the data itself…
having the time in the payload instead seems to work and not generate any warnings
{ “message”:payload, “title”: ‘Door opened at’}

Thank you all