Here's the piece in Tink's script that I thought could do what you needed:
This will only return the possible values that can be controlled.
Cheers
Al
Code:
Dim arrCC() As HomeSeerAPI.CAPI.CAPIControl = Nothing Try arrCC = hs.CAPIGetControl(dvRef) Catch ex As Exception arrCC = Nothing End Try If arrCC Is Nothing Then Log("ControlDeviceNameAndLabelValue", "No CAPI Controls were found in " & hs.DeviceName(dvRef), COLOR_RED) Exit Sub End If Dim Resp As HomeSeerAPI.CAPI.CAPIControlResponse = HomeSeerAPI.CAPIControlResponse.Indeterminate Dim CC As HomeSeerAPI.CAPI.CAPIControl = Nothing Dim Found As Boolean = False For Each CC In arrCC If CC Is Nothing Then Continue For If CC.Label Is Nothing Then Continue For If GotValue Then If CC.Range IsNot Nothing Then If Value >= CC.Range.RangeStart AndAlso Value <= CC.Range.RangeEnd Then Found = True Exit For End If Else If CC.ControlValue = Value Then Found = True Exit For End If End If Else If CC.Label.Trim.ToLower = Label.Trim.ToLower Then Found = True Exit For End If End If Next
Cheers
Al
Comment