Less than negative value conditionals

Posted on
Tue Jan 13, 2015 5:06 am
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Less than negative value conditionals

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???

Posted on
Tue Jan 13, 2015 6:51 am
DaveL17 offline
User avatar
Posts: 6781
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Less than negative value conditionals

It would be helpful to be able to see your math. :D

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 13, 2015 5:55 pm
jay (support) offline
Site Admin
User avatar
Posts: 18247
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Less than negative value conditionals

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jan 13, 2015 7:00 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Less than negative value conditionals

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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests