Please bear with me because I’m new and haven’t figured out codes and scripts. I spent hours searching this group and reddit, but can’t find what I’m missing.
I’ve been going nuts trying to figure out why I can’t get Alexa to trigger an HA automation by voice when it used to work perfectly on my old Home Assistant.
I have a Paid Nabu Casa account linked and it’s working.
When I create a test Automation and expose it to Alexa, I get notified by Alexa that a new scene was created. It works when I play the automation from HA. No problem there.
I create a routine in Alexa to turn on the scene when the word/phrase is spoken.
I speak the word and Alexa gives the Acknowledgement tone.
In the Home assistant log, it shows that Alexa sent the command, but the automation doesn’t seem to run:
If I click the log entry and then click “run actions” in the window that pops up, the automation runs fine:
I can’t figure out what I’m missing which is probably something easy I’m just not seeing.
The test automation is a simple one to just turn off a light when Alexa hears a sentence.
Being new here, I can only add one picture in the post, so here is a screen shot of the simple automation, the Alexa trigger showing in the log, and the button that works fine when I click it from the logbook:
I used to have HA running in a container on my Synology NAS and this exact procedure worked great. However, I wiped that installation and installed HA supervised running on a VM on the NAS. Everything in HA works great, except for this type of automation that used to work fine.
You shouldn’t be using an automation. You should be using a script.
Your automation has a trigger but this isn’t waiting for something from Alexa, it’s waiting for something a bit different. You don’t need a trigger at all, hence why you need to use a script. Alexa will cause the script to run by turning on the scene that it is knows about.
Thank you for taking the time to look at my probably confusing question. Since the log said:
“Amazon Alexa sent command Alexa.PowerController/TurnOn for Geode Automation: Turn on”
I thought that should have triggered the automation.
I’ve never made a script, so I’ll have to find some tutorials and do some learning. I assume when I create one, it creates a scene in Alexa that I can select like the automation did?
The funny thing is, when I first used Home Assistant a few months ago, on a different install, it worked fine when I did it with the same type of automation. I only did a couple of them, but one triggered 5 different devices like arming my Alarm and turning off a few lights and switches.
Scripts are very similar to automations, so you shouldn’t have much learning to do. Scripts differ from automations in that they don’t have the ‘when’ part and the ‘and if’ part (triggers and conditions).
So, just copy the actions from your existing automation into a new script. Then expose this to Alexa and amend your Alexa routine to turn on the new script.
I’m replying late but thank you! I got it all working and scripts turned out to be less intimidating than I thought when I first looked at them. I have a few set up now and I’m getting the hang of it.