Changes to 'greater than' mathematical function


#1

Hi folks, and minions, and other webcore genii,

I have a JSON GET query that pulls air quality data for my city. It then loads that data into a variable called “airQuality”. This is simple integer. It will pull this data every hour. I want to set it up that if it goes above 60 that it sends a notification.

IF
variable "airQuality"
CHANGES TO

What comes next? What should I put in the value/expression box? Will a simple “> 60” work? Or do I need some sort of formula here?


#2

This should work for you! Just substitute your air quality variable for the one I chose… that one wouldn’t trigger for a LONG time.


#3

You’d be surprised! Here in Utah our air quality is so terrible in the winter due to the inversion getting stuck in the valley. We are regularly in the 60s and 70s! :frowning:


#4

Can I ask how you pull that data? Share! I am trying to do the same here but I have no idea on a source


#6

I think the data you’re pulling in is a string so you can convert it with decimal(value) or integer(value) first or straight up within an expression so that ‘greater than’ will be available for comparison.

airQuality = {integer($response.data.current.pollution.aqius)}

#7

What can I say… the air quality has already hit 85 here today!

I’ve added this as an expression because I wasn’t getting the messages—hopefully it was because it was reading as a string instead of an integer, and therefore wasn’t working.

In other news… none of this is writing to the fuel stream :frowning:


#8

@acd37. I sent you a message. You might want read that.


#9

Thanks! Took care of it :slight_smile: