Alexa to Invoke Scripts

Hi - I did search for this but most topics I found seemed quite old so thought they might be out of date.

I’ve got Home Assistant Cloud and have linked my Alexa to scripts/devices in HA.

What i’d like to do is to start answering questions I ask of Alexa with information held in HA. So, i’ve got a sensor that holds the next bin (garbage) collection date and type. My plan to have alexa tell me this is:

  • Create a script that checks the value of that sensor and, conditionally, invokes an Alexa notification reading out the result
  • Expose that script to Alexa
  • Create a route in Alexa that, when invoked, runs that script giving the answer

So i’ve got two questions: Is this the optimal way of accomplishing what I’m trying to do? And is there a way of Home Assistant learning from which Alexa device I asked the question, so the response script plays only on that one?

try this