Announcement

Collapse
No announcement yet.

How to set the value of a virtual switch ?

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

  • sparkman
    replied
    This section of the help file may help you: http://homeseer.com/support/homeseer...ast_change.htm


    Cheers
    Al

    Leave a comment:


  • langenet
    replied
    You need to use hs.SetDeviceValueByRef(227,Value,True) where 227 is your Ref number..

    Robert

    Leave a comment:


  • mikee123
    started a topic How to set the value of a virtual switch ?

    How to set the value of a virtual switch ?

    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'
Working...
X