I’ve created two simple automations on ha to turn on and off my living room lights. I’ve used area to classify the lights rather than selecting single entities. In ha the automations do add programmed. I am connected to Nabu Casa as I want to keep the voice assistant. In ha I have exposed the two automations to Alexa and they are discovered. However, when I create a routine and with a voice command the donations do not work. For something that apparently should be quite simple is proving otherwise. Any help is appreciated.
Put the lights into a light group in HA. Expose group to Alexa. Just turn it on/off light normal light
OR
Alexa will turn OFF all light in living room area with the command “turn off living room lights”. If lights are exposed to HA it should just work.
I don’t think routine is needed for what you want to do.
Also if your routine isn’t working you probably setup the routine incorrectly. If devices are exposed to Alexa and you verified you can control them in Alexa then routine should just work unless you did something wrong in its creation
I have grouped the lights. The automation runs in ha. Exposed the automation to Alexa which creates a new scene. Home assistant skill is linked to Alexa. I place automation in a new routine, set voice command. And automation to the action part of the routine, save it, run it, but nothing. Lights don’t come on. Code for the on part:
alias: Alexa Living Room Lights On
triggers:
- entity_id: input_boolean.alexa_living_room_on
to: “on”
trigger: state
actions: - target:
area_id: living_room
action: light.turn_on
data: {}
mode: restart
What it the purpose of the automation. It is not needed. The light group should be used and directly toggled on/off by Alexa
Regardless, look at trace for the automation in HA ui and it will tell you if it triggered or why it failed
If you open automation editor it provides live feedback of trigger as well
So with this you can trouble shoot automation but like I said, You don’t need to use an automation
The trigger for your automation is the input_boolean turning on, so that’s what needs to be exposed to Alexa and placed in your routine.
If you want Alexa to run a sequence of actions in HA, you need a script, not an automation. That will appear as a scene in Alexa, which can be turned on.
Figured it out. Created a script and exposed that to Alexa