
Re: EZIO8SA get analog inputs
Still having newby Applescript issues.
I am trying to do a simple if then else where the if is looking for some conditions to be true such as the solar panel temperature is above the target pool temperature.
I cannot get this to work at all and I ended up hacking it back to the following very simple if statement:
set value of variable "TestSolarTemp" to 108
-- turn on solar if solar temp gets 8 degrees above target temp and pool temp not there yet. Else turn it off
-- if ((value of variable "SolarStatus" = "false") and (value of variable "SolarTemp" > ((value of variable "PoolTempTarget") +

) and (value of variable "PoolMode" = "Pool3") and (value of variable "PoolTemp" < ((value of variable "PoolTempTarget") - 2))) then
if (value of variable "TestSolarTemp" > 93) then
set value of variable "SolarStatus" to "true"
As you can see I commented out the slightly more complex if statement and put in a stupid simple one. I set TestSolarTemp to 108.
The if statement is if that value is greater than 93, then set the variable SolarStatus to true.
What I find is that even though the Variables List window shows TestSolarTemp being set to 109.
The value according the the if statement is 1.
i.e. if I successively replace 93 with a value until it is considered true.
Any ideas? I am assuming there is some sort of initialization or declaration of variables required that I'm missing.