Announcement

Collapse
No announcement yet.

Quick way to get device name in script

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

    Quick way to get device name in script

    Whats the quickest way to get to a device name from a device code (such as q13) using scripting.

    I'm not a fan of the deviceenumerator stuff, I'll do it if I have to.

    thanks

    #2
    The Device Enumerator is the new correct way of getting at this information.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Darn it. Ok, thanks.

      Comment


        #4
        Found this code in another post, credit to Jim Doolittle

        Function GetDeviceName(strDeviceCode)
        Dim objDevice
        Set objDevice = hs.GetDeviceByRef(hs.GetDeviceRef(strDeviceCode))
        GetDeviceName = strDeviceCode & " (" & objDevice.Name & ": " & objDevice.Location & ")"
        End Function

        Comment

        Working...
        X