Alexa voice command as Trigger for an Automatiom

Hello, I’m new and trying to learning HA. I’d like to use a voice command pronounced to Alexa as trigger to activate an automation.
For instance: if someone say to a specific Echo dot an “example phrase”, if this correspond to the “trigger” phrase doing an action.
I have Alexa media player already but I’m not finding what looking for.
Many thanks

Alexa Media Player provides information from Alexa devices to Home Assistant and allows HA limited control over those devices, but it does not expose Home Assistant to Alexa.

There are a few ways to expose Home Assistant to Alexa:

  1. Easy and full featured, but not free (after the first month): Get a Nabu Casa/Home Assistant Cloud subscription.

  2. Pretty easy and free, but limited: Emulated Hue.

  3. Full featured and free, but not easy: Set up a Custom Alexa Skill.

Don’t forget Node Red. You can create a routine in your Alexa App to turn a dummy switch on or off. Home Assistant can respond to this dummy switch.

Here’s how I do it.
In this website* you create a switch called “Dummy Device”. In an Alexa routine you tell her that when Alexa hears “Dummy Phrase”, turn on Dummy Device. (Or just tell Alexa to turn on “Dummy Device” but it’s awkward to tell Alexa to turn on a switch when you really want to trigger an automation.) In Home Assistant you have an automation using that switch as a trigger.

I just made one- took about five minutes.

  • The website is maintained by Ben Hardill: Node-RED Alexa Home Skill Bridge. Here you can create a virtual device. The virtual device can be one of:
    LIGHT
    SWITCH
    SMARTPLUG
    THERMOSTAT
    SMARTLOCK
    ACTIVITY
    (I have only used SWITCH and LIGHT)

  • Actions can be any of:
    On: Off:
    %: +%: -%:
    °C/F: +°C/F: -°C/F:
    Query Set Point:
    Query Current Temp:
    Lock/Unlock
    Query Lock State
    Set Color
    Set Color Temperature
    Increment Color Temperature
    Decrement Color Temperature
    (Again, I’ve only used the On,Off and %, +% and -%).

Basically, Ben did all the hard work and heavy lifting of interfacing with AWS (Amazon Web Services) so you don’t have to.

Does this still hold true today? Your solution is sortha what I had come up with. I have many esp8266’s running tasmota, with lots of unused pins. I could set those pins as relays, and Alexa would recognize them as switches or lights. Then use the Alexa app to create a “routine” after some key words, like “set party mode on”, this routine would only turn “on” the dummy device, then on HA I can set the actual automation that gets triggered when dummy device/switch gets turned on by Alexa.

That said, was hoping things had changed a bit, and we could have Alexa send command to HA directly, without having to set up dummy switches.

You would have to have an AWS developers account and create a device in AWS.
AWS makes YAML and Java look like a Kindergarten reader. That is the beauty of the service Ben Hardill provides. It couldn’t be easier.