I have made a start. First stumbling block, getting the setpoint value by device name. hs.DeviceValue(Name) ?
This is what I've come up with:
This is what I've come up with:
Code:
'Define TRV Array '440 Array Virtual Switch '224 Heating Temp Control '227 Main Heating Setpoint '294 Guest Bed TRV '288 Study TRV '282 Lounge TRV '276 Kitchen TRV dim array_trvs() as string = {"Heating Temp Control","Main Heating Setpoint","Guest Bed TRV","Study TRV","Lounge TRV","Kitchen TRV"} dim trvsetpoint as integer = 0 dim trvs_name as string = "" dim trvstr as string = "" Try trvs_name = "" trvstr = "" sub Main(ByVal Parms as Object) for each devw as string in array_trvs trvs_name = devw trvsetpoint = hs.DeviceValue(Name) trvstr = trvstr & trvs_name & " Setpoint" & trvsetpoint & "<br>" next hs.SetDeviceString(440, trvstr,true) hs.writelog("Array", "Window Count: " & windows_count) Catch ex As Exception hs.WriteLog ("Array", "Error: " & ex.Message) End Try End Sub
Comment