I have an automation that at a given time, checks to see if a virtual switch is “on”. If so, it turns on a light. This works great. In addition to the light turning on, I would like to play an Alexa skill (radio station) or at least have Alexa say something to me.
I’m not sure how to approach this. I can’t (to my knowledge) kick off an Alexa skill from within an automation. From the Alexa routine side, I don’t see a way to evaluate a virtual switch and then execute a skill. Is this something that can be done with IFTTT? I’ve tried using IFTTT, but I don’t see Amazon Alexa in the “That” portion.
Thanks for any direction you can provide.
Create your virtual device as a synthetic contact sensor instead of a synthetic switch. Alexa routines only trigger off sensors not switches.
Then in the Alexa Routine Smart Home Device > Name of contact sensor closing
There was a custom device somewhere that had both the switch and sensor capabilities for just such a case. @JDRoberts might remember what it was?
Here’s the Alexa switch/sensor that I use for ST-Alexa stuff. It explains it much better than I ever could.
When in doubt, check the FAQ section.
There’s a community FAQ on how exactly to make this work, which includes the link to the code that is both a switch and a contact sensor. So when you turn the switch on, the sensor looks like it opened. When you turn the switch off, the sensor looked like it closed. It’s a very popular integration:
FAQ: Can I trigger an Echo Action without Speaking to It?
Thank you all for the replies. I’ve not created my simulated contact sensor and can now see it within the Alexa app. Unfortunately, it doesn’t seem to be happy in the SmartThings app. Time to step back and retrace my steps and do a little debugging, but I feel like I’m heading in the right direction. Thanks again