Announcement

Collapse
No announcement yet.

Virtual field without graphic

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

    #16
    Sorry about that.

    Code:
    Sub Main(parm as object)
    dim aVal() as string
    dim sVal as string
    
    sVal = hs.deviceString("[2")
    aVal = split(sVal, ">")
    hs.writelog ("Test",aVal(1))
    ' You can assign the aVal(1) to a virtual device
    hs.setDeviceString("V1", aVal(1))
    
    End Sub
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #17
      Perfect!

      Thanks Rupp.

      Comment


        #18
        You're welcome. Sorry it took so long.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #19
          OK.

          Struggling more with this than I thought...

          I need to run this script each time the status of the device "DooMotion Plugin Last Motion" changes. How do I set the trigger????

          Comment


            #20
            Does device status change not work?
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #21
              tried change status to "any" but it is not triggering...

              Comment


                #22
                You may have to ask Jim about this one.
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #23
                  will do

                  Thanks again for you help.

                  Comment


                    #24
                    This works perfectly for a single device. I have VERY limited scripting knowledge and would like to enhance this script to include up to 5 devices. What do I need to add?

                    Thanks

                    Sub Main(parm as object)
                    dim aVal() as string
                    dim sVal as string

                    sVal = hs.deviceString("[2")
                    aVal = split(sVal, ">")
                    hs.writelog ("Test",aVal(1))
                    ' You can assign the aVal(1) to a virtual device
                    hs.setDeviceString("V1", aVal(1))

                    End Sub

                    Comment

                    Working...
                    X