I’m new to webCoRE but I have a decent understanding of programming (but still a newbie). I have A question with programming a ST button to trigger Alexa devices, maybe bouncing off ideas could help me understand if it is possible/best practices to use.
Current set up: I have 3 wifi switches in my house that only can be used by either Google/Alexa. Unfortunately I can’t actually add them to ST. I have a ST hub up for future items and ST button added.
After some work, I have added a virtual switch to ST that will trigger an Alexa routine to turn switch#1 on. In ST, I programmed the ST button after 1 press it -> Triggers virtual switch -> Triggers Alexa routine -> Turns switch#1 ON. #successful
Here’s where the more advance portion comes into play that I need some help understanding/figuring out. I would like to program another virtual switch and routine to turn this switch off with the same single button press but do it through webCoRE. I would like to reserve the dual button press and long press for additional similar functions in the future. Example “dummed” down function:
- If button is pressed
- do virtual switch(on)
-if virtual switch(on) has already ran “previously”
- do *virtual switch(off)
I would love to do a check on the switch to see its status is ON then run virtual switch(off) but Alexa doesn’t have an option to just check the status of a device (that I know of). If possible it would probably have to run a third Alexa routine in the mix. What would you ideas be for something like this? I’ve read different posts about ST button pistons but I haven’t seen anything with the same type of set up.