Page 1 of 1

Less than negative value conditionals

PostPosted: Tue Jan 13, 2015 5:06 am
by Dewster35
I'm calculating my own local wind chill based on my local temperature and my local wind speed.

I"ve got a conditional to run this calculation every 15 minutes for "If local temperature is less than 40". After going negative this morning, the conditional is evaluating to false. Any ideas on what to do here? Should I be changing any negative values to positives to evaluate for conditionals since I am doubtful we will reach lower than -39???

Re: Less than negative value conditionals

PostPosted: Tue Jan 13, 2015 6:51 am
by DaveL17
It would be helpful to be able to see your math. :D

Re: Less than negative value conditionals

PostPosted: Tue Jan 13, 2015 5:55 pm
by jay (support)
So, I created a schedule that decremented a variable by 1 every 5 seconds. I then created a trigger than fires whenever there's a change to that variable with a condition of if the variable is less than 2. I set the variable to 3 and started the schedule. It counted down and successfully fired the trigger after it decremented past 2 and on into the negatives.

So maybe I'm not understanding your problem.

Re: Less than negative value conditionals

PostPosted: Tue Jan 13, 2015 7:00 pm
by Dewster35
The math for calculating windchill works... it's getting the trigger to follow the conditional rule I believe. If you would like to see the script I'm using I would be happy to share.

Jay,
It is a simple conditional of Device State for temperature "Less than" 40 and of course I'm unable to reproduce it while manually inputing negative values... so I guess hope for below zero again. Thank you for checking it out. I don't mean to be a bother.