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

    SmartThings Button not a Switch?

    General Discussion
    2
    5
    295
    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
      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
        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
          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
            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
              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
              • First post
                Last post