I have a simple routine in Alexa which triggers a scene and that scene runs an automation in HA when i say “Alex, i’m taking a bath” or “Alexa, i’m taking a shower”
The problem is when I say that, Alexa replies me with something like “Enjoy your bath” “Take care of you” or anything else funny but doesn’t trigger the scene…
If I insist several times it sometimes activate the scene but it’s random
An automation has to have a trigger to set it off - the state of a switch, say: start the automation when the switch changes from off to on. A script is just a block of code that is launched by something else.
Alexa routines can be used to launch scripts from voice commands - and confusingly a script is referred to as a scene in the Alexa app.
So you need to write a script, something like:
alexa_bathroom_light_on:
alias: Alexa bathroom light on
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.bathroom
mode: single
When this is exposed to Alexa and you write your routine in the Alexa app, it will appear in the list of actions under Smart home | Control scene.
You can’t use a HA scene to trigger an automation as you have done, because it doesn’t have a state as such - it’s more of a description of the state of other entities.
Not familiar with IOS, I’m afraid. Android has a toggle widget which will launch a script (scripts are listed by name in the drop down). The script could turn on the HA scene with scene.turn_on. That way the same effect could be achieved either by voice command or by widget… Have I correctly understood what you’re after?
The problem with Alexa integration is triggering the “Enable/Disable Automation” instead of “Trigger Automation”. To work around this issue, I have created another automation that will runs the Automation we want when Alexa turns it on. and for sure i turned it off
I’m not clear on what issue you’re trying to work around, but calling the automation.trigger service outside of troubleshooting is almost always a bad idea. And using an extra automation triggered on the state of another automation is just many extra layers of badness.
I’m certain that if you explain the issue you have, there is a sane way to solve it.