Announcement

Collapse
No announcement yet.

Help with one line script output to log?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with one line script output to log?

    I have a simple Action in an Event to run a one line script to create an entry in the log as follows:

    &hs.writelogEx("UPS Update","UPS: "& hs.devicestring("u50")& hs.devicestring("u54"),"#FF00FF")

    The log entry is: UPS: 100% Battery Capacity39 Minutes Runtime Left

    What I'd like to do is add a space, or comma, or dash or something to separate the output for u50 and u54, so it looks something like this:

    UPS: 100% Battery Capacity, 39 Minutes Runtime Left

    I can't work out how to do this, or even if it can be done. Can anyone please help point me in the right direction?

    Many thanks.
    All Z-Wave, #101 devices, HomeTroller Series2, HomeSeer2 v.2.5.0.81, & 1x Z-Troller

    #2
    &hs.writelogEx("UPS Update","UPS: " & hs.devicestring("u50") & ", " & hs.devicestring("u54"),"#FF00FF")

    Should do it and hopefully you can see what I have done. This explains it if you are interested http://msdn.microsoft.com/en-us/library/te2585xw.aspx
    Last edited by mrhappy; July 23, 2014, 08:37 AM. Reason: removed a space

    Comment


      #3
      Try:
      &hs.writelogEx("UPS Update","UPS: "& hs.devicestring("u50")& "," & hs.devicestring("u54"),"#FF00FF")
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        Thanks guys, that worked great, I have no idea why I couldn't figure out something as simple as this myself! Much appreciated.
        All Z-Wave, #101 devices, HomeTroller Series2, HomeSeer2 v.2.5.0.81, & 1x Z-Troller

        Comment

        Working...
        X