TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SmartThings Button not a Switch?

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      KenJ
      last edited by

      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.

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @KenJ
        last edited by Russ

        @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#L63

        The 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.

        Russell VanderMey

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          KenJ @Russ
          last edited by KenJ

          @Russ Thanks, will remove the on/off function? So does it effect everything.

          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            Russ @KenJ
            last edited by

            @KenJ, yes, it does affect everything, so it might not be what you want.

            Russell VanderMey

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              KenJ @Russ
              last edited by

              @Russ that's what I thought, it's working turning off/on so I will not change it. Thanks

              1 Reply Last reply Reply Quote 0

              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
              • First post
                Last post