How to trigger Alexa routines from Home Assistant

If you have a sensor named “Garage Door”, you can ask “Is garage door open?”.
Also, if I associate a temp sensor with a room (in the Alexa’s app), I can ask “what is the temperature in the living room?”.

Thanks, “Garage Door” is my HA cover device, I’ll have to rename it and rename my binary sensor also, I’ll give it another try.

My binary sensors are showing up in Alexa as ‘on’ or ‘off’ however, even tho I’ve set the class to garage door.

Does anyone know if this is working with the Nabu Casa cloud component as yet? In previous post it was mentioned that the Nabu Casa cloud component did not support active reporting.
Is the “Enable State Reporting” option not the same thing?

1 Like

Yes. The “Enable State Reporting” option enables this.

Thanks @abmantis - I exposed one of my temperature sensors to Alexa (via Nabu Casa) and added it to a room in Aelxa. Now, when I ask Alexa what the temperature is in the kitchen, she responds with the same temperature I’m seeing in Home Assistant (so the state reporting definitely working).

I am now struggling to create a routine that can be triggered from Home Assistant :frowning:

I have created a template sensor (which I can choose as the trigger when creating the routine), but when I try and save the routine I get the following error: “There was a problem creating this Routine.”

Here is a video of me trying to create the routine. Any ideas what the problem could be?

I get the same error, have checked the sensor, deleted it from Alexa re discovered it, still get the same error
the sensor is a door type and works fine in HA

Same here @foxlees - I have tried removing all devices from Alexa and discovering them again. I have tried the Alexa app on my iPhone, and iPad and an Android phone. And lastly I even created a new Amazon account from scratch, linked everything up there and it still does not work.

No idea why we can’t save the routine :frowning: Other routines can be saved though, but not a routine where I use the sensor as the trigger :frowning:

I just updated the Alexa app on my iPhone (to 2.2.2913750.0) and now the Routine is being saved properly!! YEAH!! :smiley:

I updated mine as well now saves which is great but for some reason Alexa not seeing the state changes of the sensor so routine not activating, have re discovered after deleting the sensor from Alexa, re sync on the cloud Alexa card, still no luck

@foxlees, is your State Reporting on as mentioned here?

Yes that is all correct, I actually got it to work, I was doing a change in my configuration.yaml, and restarted hassio, when it came back up, Alexa burst into voice and pronounced my respi cues from the sensor I was setting up, so looks like all it needed was a reboot.

So success all working :blush:

Awesome @foxlees!! Enjoy :slight_smile:

I’m excited for this, so can you use the TTS “Alexa says” within a routine? I’ve been dying for this, add-ons were too unreliable for me to get TTS working.

How much is the cloud service anyways??

Hi @emnaudin, yes you can then use Alexa as a TTS.
Another solution can be

Hey folks, totally new to - trying it out purely because of this ability to trigger Alexa routines. I use EventGhost at the moment. Have managed to use EventGhost to create a binary sensor (via Python) and trigger its state in HA - I want to use this to trigger my Alexa routines if possible. Alexa finds the sensor, but it’s not selectable as the trigger when I create my Alexa routine. I have enabled the ‘Enable State Reporting’ in the HA cloud component, re-enabled the Alexa skill, etc. - no joy. I am completely new to HA, so please be gentle (and do talk to me like an idiot, because I need clear instructions). The sensor does not show as an entity in HA - could this be my problem? Many thanks in advance.

EDIT: Damn. Fixed the issue (just needed to include the ‘door’ device class attribute in the JSON payload. It now appears in the Alexa app as a smart home trigger for my routines, but when I select it, I get ‘This device is not currently supported’. A quick look here: tells me that’s because I’m in the UK, not the US or Canada. Us Brits get left behind ALL THE TIME with Alexa and it’s so annoying!

Anyone know of a way I can simulate a button instead of a sensor?

I’m having similar problems. Using Nabu Casa Cloud to talk to Alexa. Alexa sees and controls my exposed devices perfectly (“Alexa, turn on the lights”). Now want to trigger a routine.

Created an input boolean and exported it to alexa as a contact sensor:

     - input_boolean.cat_feeder_alert_go
      name: Cat Feeder alert
      display_categories: CONTACT_SENSOR

(only relevant portions left in)

Added to Alexa. On the “all devices” screen in the Alexa iOS App, the sensor is there, and responds to changes in HA, although on its detail screen it displays a “There was a problem” banner. Nonetheless, it works.

There are probably 20-30 other devices visible under “all devices”.

However, when I go to create a routine, on the “When this Happens” -> “Smart Home”, I get “No devices found. To start a routine with a smart home device, add one in the Devices section of the Alexa app.” Absolutely no devices show up here at all.

The devices is also visible in the Alexa web app, but the web app doesn’t have routines…

Anyone have any ideas?

1 Like

Hey everyone!
I set up everything so far, but I am completely new to home assistant and I usually need some time too get comfy with all this.
I need help setting up a device tracker to be a template binary sensor for triggering alexa routines.
Can someone help me? I currently have the HA app on my phone and a ping setup for device presence, planning on going deeper into this later, so if you can provide me a little walkthrough of the code to create a template binary sensor with the required door class, that would be amazing. Thanks!

Nevermind figured it out. I have my binary sensor now in the Alexa app, working perfectly, reporting the open or close state, because device class is a door. But I can’t get it to trigger routines. I can set it as trigger for a routine, but it won’t trigger the routine.
I am not using Home Assisant Cloud, I saw someone suggested using the debugging tool in the alexa developer console, but I can’t get my head around this, need detailed instructoins please. I followed the tutorial carefully, went over it a few times now, everything is as it should be. No idea what to do. please help.

I’m having the same problem. The Alexa app discovers the boolean switch as a contact sensor but displays “There was a problem” when I attempt to utilize it? Did you ever sort this out?

1 Like

Just for the record: I gave up on this approach and am just using the AlexaRemote palette in NodeRed. I’m not a fan of NodeRed, but this just works…