I understand the concept but cant seem to find the correct way to capture the name of whichever devices opens at the time, and pass that to Alexa to notify via:
Possibly…so I want to capture any/all state changes, and if its a specific group of sensors…capture say, the friendly name, of that sensor that just opened, then pass that to a service call to Alexa notify that “sensor has just been opened…”
I just need to capture that sensor name, and pass it into the
{
"message": "{{sensor name here}} is open...",
"data": {
"type": "announce"
}
}
I think the easiest way is to do something similar to what i have done. Basically have a switch with output a string of ‘on’ or ‘off’ (or whatever open is for the particular sensor) and when the ‘on’ is triggered, set the new message.payload as say “Lounge Door”.
You then have a string and a name to push into the alexa speech.
I know what i mean to say but I don’t think i have explained it and I hope it makes sense!
mb
EDIT: In my example above Alexa replies, "Please check the xxx,xxxx,xxx sensor "