Announcement

Collapse
No announcement yet.

Contol Buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Contol Buttons

    Hello,

    Is there a way to change the text in the control buttons of a device in the staus page? It is now only "On" or "Off" I would like buttons what would read "Open" or "Close" etc

    Thanks in Advance

    Fred

    #2
    Check out this help page:

    http://www.homeseer.com/products/hom...eValuesAdd.htm

    -Rupp


    {{{{{{{{{{ Remember the reason for the season }}}}}}}}}}
    -Rupp
    sigpic

    Comment


      #3
      Rupp,

      Do I have to create an event? I'm a beginner in scripts.

      Fred

      Comment


        #4
        OK, I figured it out, however this is not what exacly wanted, I like to have 2 buttons instead of a drop down list.

        1) Is this possible?
        2) How can I get the On/Off buttons back? I tried to delete the device and restore it but I keep getting the drop down list back


        TX

        Fred

        Comment


          #5
          Have a look at deviceButtonAdd instead of deviceValueAdd.


          Have a look at this example to add and remove.
          (found on the board)


          <pre class="ip-ubbcode-code-pre">
          sub Add()
          ' add a button to the device "A1" that allows a message to be
          ' spoken when the button is pressed. Label the button "speak now"
          hs.DeviceButtonAdd "A1","speak.txt(""main"",""hello"")","speak hello"
          hs.DeviceButtonAdd "A1","speak.txt(""main"",""test"")","speak test"
          hs.DeviceValuesAdd "A1","On" & chr(2) & "100" & chr(1) &_
          "Off" & chr(2) & "0" & chr(1) &_
          "My Status" & chr(2) & "29" & chr(1) &_
          "~35%" & chr(2) & "35" & chr(1) &_
          "My other status" & chr(2) & "55",True
          end sub

          sub Remove()
          ' remove the button added above
          hs.DeviceButtonRemove "A1","speak hello"
          hs.DeviceButtonRemove "A1","speak test"
          hs.DeviceValuesAdd "A1","",False
          end sub
          </pre>

          -Rupp


          {{{{{{{{{{ Remember the reason for the season }}}}}}}}}}
          -Rupp
          sigpic

          Comment


            #6
            Rupp

            Thanks, that did the trick

            Fred

            Comment

            Working...
            X