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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login