I am having a problem with executing the following immediate script command:
&if hs.deviceValue (434) > 45 then hs.setDeviceValueByRef (434, 45, True) elseif hs.deviceValue (434) < 25 then hs.setDeviceValueByRef (434, 25, True)
The log displays the following error:
Error Compiling script /tmp/K37.vb: Expected '('.
Can someone help me with what I'm doing wrong?
Basically I'm trying to clamp the value of device 434 between 25 and 45 (% Relative Humidity set point calculated in another script command).
Thanks,
&if hs.deviceValue (434) > 45 then hs.setDeviceValueByRef (434, 45, True) elseif hs.deviceValue (434) < 25 then hs.setDeviceValueByRef (434, 25, True)
The log displays the following error:
Error Compiling script /tmp/K37.vb: Expected '('.
Can someone help me with what I'm doing wrong?
Basically I'm trying to clamp the value of device 434 between 25 and 45 (% Relative Humidity set point calculated in another script command).
Thanks,
Comment