I have a Fibaro keyfob. Currently programmed with routines, so that when a button is pressed, a light group is turned on, or when button is held, the light group is turned off.
Would it be possible to use the Mc virtual mirror to use a single button click to “toggle” the on/off state of the light group?
I’ve set up two routines, one in each direction but the one click executes both routines each time so I always end up with the final state (off)
I am wanting to “toggle” a light group on or off. i,.e. if they lights are on, pressing the button will turn them off. If the lights are off, the button will turn them on.
I find the “Turn on or turn off” option only works one way. i.e. it will turn off, but never back on again
I am a software developer. I wonder if I could develop some kind of toggle switch virtual device? I know nothing about developing for smartthings. Are there any good tutorials you recommend?
you can create a virtual switch that receives the switch on/off command of the button.
Then you have to do two routines one to turn on the group when the switch is turned On and another to turn it Off.
You can create a mirror switch with Aplicaciones Virtuales Mc driver
or others with community drivers
AlejandroPadilla
(Please contact @nayelyz or @Luis_Humberto_Medina )
9
Hi @Mark_McGee if you want to inform about an issue on SmartThings, you can send a mail to build@smartthings.com with the description and the evidence. or you can send me a message with that information and I will create the report
I can confirm that I’ve noticed some time back that a routine with button ‘on or off’ when pressed, only ever switched on->off, but not off->on, a virtual switch I have, that depending if ‘open’ or ‘closed’ triggers a different Alexa routine.
I imagined that was an inherent characteristic and so set up 2 rules with IF on, THEN switch off, and vice versa.
Reading your post, and @Mariano_Colmenarejo 's reply - this is bug maybe?
The issue I’ve had with assigning two routines to the same action is that the first executes and turns the lights off, then the second one executes and flips them back off again!