I have 2 Amazon Echo Dot at home and using Nabu Casa. Is there a way to find out which Alexa received the voice command? I would like to send a voice command from Alexa to Home Assistant and send a personalized response to Alexa depending on the status of some sensors.
Example: When I’m about to leave, I would say “Alexa, I’m leaving”, it will check all door and window sensors and say something like “Ok, have a great day” or “Wait! Please check windows before leaving”.
Alexa routines have an option for you to choose which device replies when you give a command, and one possibility is “the device you speak to”. Could you do something with that - call a HA script from a routine, perhaps?
Hi!
Thanks for your answer.
I have seen this option but my script is the responsible to evaluate the condition (window open or close) and prepare the voice response, so this does not work for me.
If you haven’t already, you may want to look into the custom component Alexa Media Player.
It has a way for you to check which device was “last called”.
@wmaker,
I am hoping you can help or direct me to anyone that can help.
Using Alex “Last Called” works perfect; however, the group only contains and recognizes physical devices… Does any one know how to add an Alexa’s Device name if it is called from the Alexa IOS App? I can easily trigger the Alexa routine, but it will not link back to the HA Scene to complete the routine. My personal background… I am an advanced diabetic. I use several Alexa Routines and HA Scenes that essentially eliminates sticky notes and guessing logged entries. Essentially I can tell Alexa How much insulin and time injected. Everything is stored in a separate log as well as HA Helpers that provide how long ago and what time the last injection was. This works perfectly at home, but, when I am away, Alex’s “Last Called” returns Unavailable; thus disconnecting this life saving database while I am out or on travel.
“soft Echo” devices such as the iOS App as you and I have noticed don’t behave the same way as “hard” Echo devices, so I don’t know either. However since you can still run a routine, you could probably have the routine send a HA notification with the same text string rather than having Alexa run a text2speech.
Thanks for the response; unfortunately, the routines are very interactive. I will have to find another method to retrieve and update my critical interactive data. Meanwhile, I need to order a case of sticky notes… LOL