Announcement

Collapse
No announcement yet.

Timer values from a script

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

    Timer values from a script

    How do I get a timer value via scripting? I see ones for counters, but not timers.
    Kirk

    http://cleverhouseautomation.ca
    http://southcoastwebsitedesign.ca

    #2
    Code:
    Dim ts as TimeSpan = hs.TimerValue("mytimer")
    Jon

    Comment


      #3
      Originally posted by jon00 View Post
      Code:
      Dim ts as TimeSpan = hs.TimerValue("mytimer")
      That is perfect. How do I convert that to a string to assign to a virtual device. I have tried a few things and none work.
      Kirk

      http://cleverhouseautomation.ca
      http://southcoastwebsitedesign.ca

      Comment


        #4
        Code:
        Dim ts as TimeSpan = hs.TimerValue("mytimer")
        Dim Result as String = ts.ToString("dd\:hh\:mm\:ss")
        hs.writelog("Test",Result)
        Jon

        Comment

        Working...
        X