This script will just take the current dim level for a device, and then add +1 to it. You need to call the sub Main, of course, and then use the device reference of the device you want to control as the parameter. 

Code:
Public Sub Main(ByVal _deviceRef As Object) Dim deviceRef As Integer = Integer.Parse(_deviceRef) Dim deviceValue As Integer = hs.DeviceValue(deviceRef) 'Exit if the device is already at maximum, i.e. "On" If hs.CAPIGetStatus(deviceRef).Status = "On" Then Exit Sub 'Find the correct CAPI control to execute. I really miss Linq!!! For Each cc As HomeSeerAPI.CAPIControl In hs.CAPIGetControl(deviceRef) If cc.ControlValue = (deviceValue + 1) Then 'Set the correct dim level hs.CAPIControlHandler(cc) 'We're done, so let's exit! Exit Sub End If Next End Sub
Comment