Announcement
Collapse
No announcement yet.
Script help H2=>H3
Collapse
X
-
Devicereferences are numbers, not strings. So you don't use quotes around them.
Try this:
Code:Sub Main(Byval parameter as String) intTemp = hs.DeviceValue(18) retValue = 0 If intTemp > 0 Then If intTemp < 15 Then retValue = 1 Else If intTemp > 25 Then retValue = 3 Else retValue = 2 End If End If End If hs.SetDeviceValueByRef(271, retValue, True) hs.SetDeviceString(271, hs.DeviceString(18), True) End Sub
HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
Running on Windows 10 (64) virtualized on ESXi (Fujitsu Primergy TX150 S8).
WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample
Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!
Comment