SmartThings Button not a Switch?
-
Is there a way to create a SmartThings Button, not a switch?
I am using this for a Whole House Audio system the Power on works for Switching the zone on/off, but I am also using to increase/decrease the volume and just need a button.
-
@KenJ, if you remove the // from the off() line, then every time you tap the button it will turn itself back off, so it will act like a button instead of an on/off switch.
def on() { log.debug "Executing 'on'" sendEvent(name:"switch",value:on) parent.on(this) // off() }
This is the line in the device code:
https://github.com/rvmey/SmartThingsPublic/blob/06ee7ca6523d948c814b8f3f070810eef3b29072/devicetypes/vandermeyconsulting/triggercmd-switch.src/triggercmd-switch.groovy#L63The problem might be that this change will make all of the TRIGGERcmd SmartThings switches act this way. I'm not sure if that's what you want.
-
@Russ Thanks, will remove the on/off function? So does it effect everything.
-
@KenJ, yes, it does affect everything, so it might not be what you want.
-
@Russ that's what I thought, it's working turning off/on so I will not change it. Thanks