Hi,
I want to set up node red when some state is true to send up email. I have set up this, but problem is that I get only email with message “true”, is there some other option that I will get email white message for example “something is moving”
Hi,
I want to set up node red when some state is true to send up email. I have set up this, but problem is that I get only email with message “true”, is there some other option that I will get email white message for example “something is moving”
You need to adjust the payload going to the email node. This isn’t really a home assistant issue, you just need to understand how the msg object goes through the flow, and how the email node uses that info.
You can have function node before call service node with
let d = new Date();
var msh = msg.payload;
var n = d.getTime();
var h =d.getHours();
var m =d.getMinutes();
msg.payload=
{
"data":{
"title":"HA: Failed to turn on 5 times at"+h+":"+m+"",
"message":"Failed to turn on 5 times"
}
}
return msg;