I have an automation named Christmas Lights which turns on several devices at sunset. I have it exposed to Alexa and Assist. So not being sunset, I removed the trigger and it still did not work with voice commands. Then I used a trigger of a specific time and at that time said “Alexa, turn on the Christmas Lights”. Still didn’t work. When I used Assist it responds "Turned on the automation. Is there a way to run an automation using voice commands? Or should I just write a script?
In HA, “Turning On/Off” an automation is actually enabling or disabling it, not triggering it. You can add a Sentence trigger in the automation itself if you want to trigger it using Assist commands.
Options:
Use a script, which once exposed, should be available as a “scene” in the Alexa app. Assist has a specific intent sentence for turning on a script.
Use a Helper as a proxy between Alexa and HA. This could be an Input Boolean Helper, a Template Switch, or a Template Light. For the Input Boolean, you would add that as a trigger in your existing automation.
If your christmas light are an entity in HA then you expose this entity to assist and nothing else is needed… if this entity is called christmas lights then you can just say christmas lights on to assist and it works.
Or off if you want that at the end of the year.
Yes thank you. I took Didgeridrew’s suggestion and created an automation with two sentence triggers, and added a sunset trigger. So now I can just press the power button on my phone and say “Christmas Lights On|Off”. And they will also come on at sunset.
Updated to calling two scripts to handle all of the on/off actions.
I am so glad I switched from Hubitat to Home Assistant!!!