I have a script I was using in conjunction with Stargate (HVAC Tempmode is a Stargate imported device) that worked fine with 1.7, but now won't fire. I'm guessing that there's something about "hs.devicevaluebyname" that 2.0 doesn't like, but nothing shows in the log at all except that the script did in fact run. Would appreciate any info to correct this:
function readMode()
if hs.devicevaluebyname ("HVAC Tempmode")=1 then
hs.setdeviceString "[8","OFF"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=2 then
hs.setdeviceString "[8","Heat"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=3 then
hs.setdeviceString "[8","Cool"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=4 then
hs.setdeviceString "[8","Auto"
end if
if hs.devicevaluebyname ("HVAC FanMode")=5 then
hs.setdeviceString "[13","Auto"
end if
if hs.devicevaluebyname ("HVAC FanMode")<>5 then
hs.setdeviceString "[13","On"
end if
end function
Thanks!
function readMode()
if hs.devicevaluebyname ("HVAC Tempmode")=1 then
hs.setdeviceString "[8","OFF"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=2 then
hs.setdeviceString "[8","Heat"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=3 then
hs.setdeviceString "[8","Cool"
end if
if hs.devicevaluebyname ("HVAC Tempmode")=4 then
hs.setdeviceString "[8","Auto"
end if
if hs.devicevaluebyname ("HVAC FanMode")=5 then
hs.setdeviceString "[13","Auto"
end if
if hs.devicevaluebyname ("HVAC FanMode")<>5 then
hs.setdeviceString "[13","On"
end if
end function
Thanks!
Comment