Alexa not Issuing Command to HA (Scene)

Hi there!

I am rather new to HA, trying to give Alexa commands to execute HA automations. Nabucasa user.

According to HA, everything should be working… Ì exposed an automation to Alexa and it recognized as a scene.

I configured an alexa routine to activate the scene once I say a specific command.

Alexa answers as if it was properly executed, but nothing happens.

Automation is working If I execute it directly from HA, although it has nothing under “When”.

Any sugestions?

Thanks in advance!

Try using a script instead of an automation.

Thank you. Will try that. An automation seemed easier.

Is it possible to call an automation from a script? The idea would be to expose the script instead of the automation and I would preserve the work done with automations…

If you don’t want to use a script, best practice would probably be to have Alexa turn on a toggle helper (input_boolean), then include an extra trigger in your automation for that.

Don’t forget to turn the helper off again at some point, or the trigger won’t fire a second time. :grin:

1 Like

Just to end the thread, it is perfectly possible to call an automation from a script. It is ALSO recognized as a scene in alexa, but calling it, works.

alias: "name that will be exported to alexa and called for execution by a voice command"
sequence:
  - service: automation.trigger
    target:
      entity_id: automation.name
    data:
      skip_condition: false
mode: parallel
icon: mdi:script
max: 2

Yes, but the original poster should understand the difference between a script and an automation before you just say “call a script from an automation”.

An automation is triggered to happen when something changes (like a state, or a time, or whatever).

A script is things to do.

Once you fully grasp that, you can then delve in. Most every “automation” I have call scripts. Because I want those to happen when something changes. But if I want them on demand, I may have Alexa call the script directly. And I say “may” because maybe the script triggers if an input_boolean goes from off to on, so I can just have Alexa change the boolean (and then Home Assistant runs the script).

There is no perfect answer. But as a long time user, I would always create scripts and then automations that trigger those scripts. I would never put anything I may want to reuse verbose in an automation. Separate the logic from the actions.

Thank you, will keep that in mind.