Author |
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: June 06 2009 at 09:51 | IP Logged
|
|
|
I'm trying to have color coded temperature display like red when the temperature is over 80, white when it's 40 below.
I created a trigger when the global variable changes with the following raw formula:
ph_setccobjbcolor("WEATHER","TEMP",if({CURTEMP} >70 then rgb(0,0,255), rgb(0,255,0)))
But I get an error...
any idea what wrong and if I can even use if and a global variable in a trigger? I can always use a macro but I'm lazy today...
Edit: wrote the macro and it looks very cool but if I can an answer for the trigger, it would be great.
Thank you
Edited by veropierre - June 06 2009 at 10:12
__________________ 37 Insteon Switches + 14 Lamp Modules + 7 ControLinc + 2 RemoteLinc + 3 Insteon Thermostats + 8 Zones Sprinklers + several X10 + Power Home 2.1.4 = Happy Camper
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: June 06 2009 at 10:12 | IP Logged
|
|
|
There is no "then" in an if statement
if({CURTEMP} >70 then rgb(0,0,255), rgb(0,255,0))
if({CURTEMP} >70 , rgb(0,0,255), rgb(0,255,0))
EDIT: I wrote a Global Variable trigger that uses an if to check the value of CURTEMP. Works fine.
Edited by grif091 - June 06 2009 at 10:59
__________________ Lee G
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: June 06 2009 at 14:49 | IP Logged
|
|
|
DUH... thanks grif091... that's the problem when you're too lazy and try to recycle formulas...
__________________ 37 Insteon Switches + 14 Lamp Modules + 7 ControLinc + 2 RemoteLinc + 3 Insteon Thermostats + 8 Zones Sprinklers + several X10 + Power Home 2.1.4 = Happy Camper
|
Back to Top |
|
|
|
|