I want to set the value of a virtual switch via a script. The virtual switch can have value 14,18,20 or 21.
Sub Main(ByVal parm as Object)
Dim Value As Integer
Value = hs.devicevalue(227)
'Heating main thermostat heat setpoint
If Value = 14 Then
set device 416 to 14
ElseIf Value = 18 Then
set device 416 to 18
ElseIf Value = 20 Then
set device 416 to 20
ElseIf Value = 21 Then
set device 416 to 21
End If
End Sub
so I need the correct command for 'set device 416 to'
Sub Main(ByVal parm as Object)
Dim Value As Integer
Value = hs.devicevalue(227)
'Heating main thermostat heat setpoint
If Value = 14 Then
set device 416 to 14
ElseIf Value = 18 Then
set device 416 to 18
ElseIf Value = 20 Then
set device 416 to 20
ElseIf Value = 21 Then
set device 416 to 21
End If
End Sub
so I need the correct command for 'set device 416 to'
Comment