So routines don’t support switches as a trigger to perform them. I was hoping I could create an app that would change the state of a virtual presence sensor or virtual contact sensor, with a switch state change.
Can you change the state of a virtual presence sensor or contact programmatically?
Ha! For some reason I was confusing that with a different orchestrator app I saw. I guess that saves me time. Good thing I posted before I dove into working on it. Thanks!
MichaelS also has a nice smartapp he calls Alexa helper which will let you set up six switches to change modes or run routines. It’s intended to make it faster to set things up for an echo integration.
It also works with either momentary are binary switches.
The first step would probably be to look someplace other than the developers category. Around here the “hackers” are mostly very serious coders.
Anyway, it depends whether you want to just put the unlock in a routine, which is what I do, or something trickier where you can actually tie that specific lock to a switch so you can use it in other smartapps as well.
If you put it in a routine, it’s super easy. Just use the FAQ for having Alexa run a routine. But then you’re going to need one virtual switch to lock, and a different virtual switch to unlock. That works fine for me because my door is on autolock anyway, I only need to unlock (from inside)
If you want to assign the lock to a virtual switch so you can do both lock and unlock on the same switch , you’ll need an additional smart app. To find the instructions for that, start with the Alexa FAQ and just read about using it with locks: