DaveTiff
(Dave T)
December 2, 2021, 2:13pm
1
Hi still very new to Node-Red I have a temperature sensor on a ESP Home Device in the garage.
ID is “sensor.garage_temperature”
Trying to get that in Node-Red, but struggling. I thought the new(ish) Get Entities node would be ideal.
I want to use that temperature value is a Alexa speak sentence.
Many thanks in anticipation
Regards Dave
You dont need the get entities node for that. Simply a normal state node will do.
Get Entities is cool when you want to get several entities that you define in the node. i.e.: Every sensor that has the name brightness in it and is above 50lux.
In you case, a current state node will give you the value of the sensor. You can then just use the message with Alexa
flyize
December 2, 2021, 7:20pm
3
Yes, do a Get State for the entity, then use {{payload}} to have Alexa say the temp.
DaveTiff
(Dave T)
December 2, 2021, 7:28pm
4
Many thanks, have tried that and payload = Temperature.
What node do I need to add the get the payload added to some text i.e. "The garage Temperature is " payload
Regards Dave
Hellis81
(Hellis81)
December 2, 2021, 7:42pm
5
In the call service node that you speak the message:
....
....
message: "The garage temperature is {{payload}} degrees",
....
....
DaveTiff
(Dave T)
December 2, 2021, 8:10pm
6
Brilliant no place for it in the “Routine Speak” node so put in a template.
<speak>
The garage temperature is {{payload}} degrees
</speak>
One again, thank you all for your help
Regards Dave
flyize
December 2, 2021, 8:49pm
7
Just use the Call Service node, with data looking something like this:
{
"message": "Please close the following doors and windows. {{payload}}. Good night.",
"data": {
"type": "tts"
},
"target": [
"{{data.state}}"
]
}
This assumes you’re using AMP tho, and maybe you aren’t.
DaveTiff
(Dave T)
December 2, 2021, 9:21pm
8
Hi I am using “node-red-contrib-alexa-remote2-applestrudel” as my way of getting Alexa to speak
Re Dave