Because you want to say āturn onā this makes it tricky. But you can solve this by creating a virtual switch and use the auto off feature of 2s. Then create a rule that will follow the state of this switch. If this switch is on, turn off your physical switch and when off turn it back on. Then setup your button to also turn on this same virtual switch. No need for toggle since the auto off feature will take care if it.
One of my apps āFlasherā will do this for you.
You can trigger off a button and set the number of flashes and the duration (inc time between flashes)
You can also trigger off a virtual switch controlled by Alexa - just create a virtual and set the auto off for 1/2 sec or something.
With Flasher, you can start with the lights on or off - configuable
Or...
use 'One to Many'
(One of my apps - set to 'reverse mode'.. - when you turn a switch on it will turn others off)
Use a virtual switch with a 3-5 second delay (I have a driver for that)
Get Alexa to find the switch.. (lets call it switch A)
Tell alexa to 'turn switch A on'
Alexa turns it on... one to many turns the other switches/lights off
After a few seconds.. switch A automatically switches off again
One to many switches the switches/lights on..
Sounds complicated but really easy (If I understood what you want correctly)
edit: You can also use button controller (in-built app) to turn 'switch A' on with a button (which will start the process)
Cobra, I'm not getting anything back from the One to Many.. returns 404 ?
I should say when you click to copy parent URL.
I tried loading the raw code from github and got this..
Metadata Error: Parent App 'Cobra:Cobra Apps' not found on line 51
You need to install cobra apps first, then add the parent/app code for the app you want.
Have a look st the āinstallation helpā on the website
Copy code for the cobra apps container to you hub and save
Install cobra apps and save
Select the app you want from the CA drop-down list
This then shows a button so you can load the parent app (providing the code for that app is saved to you hub
From the parent app you can install any number of child apps
I have the exact same setup with my motion detecting floodlights in the backyard where the pulse On-Off-On will override the motion detector. I got mine from Lowes and would love to get this working as well.