Hello. I am trying to create a flow which will send a Pushbullet notification to my phone once a sensor battery drops below 10%.
The flow is very simple. The only problem that I have is constructing the JSON message to be sent to the HA notify service, since it consists of strings + variables, therefore I use a function to put that in a msg.payload and pass that to the call service node.
As per the debug info everything to calling the service works fine. The call service works if I pass a string message, however if I put empty curly brackets to pass the msg.payload object as JSON message I get an API error that the message cannot be empty.
What am I doing wrong?