I am trying to have the text on a page change color depending on the status of one of my devices. I've got all the code working except the if statement for setting the hex value used in the color statement.
Here's the code I'm having trouble with. I'm guessing I'm missing something that let' it evaluate the device status properly.
var hex="666666";
var hds=hs.devicestatus("V26")
if(hds<3){
hex="00FF00";
}
If I replace the "var hds=hs.devicestatus("V26")" line with "hds=2" or "hds=3" it works OK.
Any ideas what I'm missing?
Here's the code I'm having trouble with. I'm guessing I'm missing something that let' it evaluate the device status properly.
var hex="666666";
var hds=hs.devicestatus("V26")
if(hds<3){
hex="00FF00";
}
If I replace the "var hds=hs.devicestatus("V26")" line with "hds=2" or "hds=3" it works OK.
Any ideas what I'm missing?
Comment