How to trigger on Weather Tile value


#1

I’m trying to figure out how to get a piston to trigger when the precipitation potential is > 70%. I’m using the Weather Station Tile 2.0 https://community.smartthings.com/t/release-weather-station-tile-2-0/43833 device handler to get the value.

What am I not doing right?


#2

Is the current percentprecip = to 0.01?
If its not that is why you are getting false.
Have you tried is greater than or less than.
Does that work?


#3

No, its currently 70%, I set it to > 0.01 just to try and get it to trigger.


#4

You are using ‘is’ 0.01.
Not used this but perhaps try
is greater than as your trigger and 50% in the expression field or as a value. Have a little play to see what might work.


#5

Data is probably coming in as a string, convert it to a number with one of the functions.

decimal([WeatherTile:percentPrecip]) or integer()


#6

I don’t have the option for “is greater than”. I take it that means that particular function returns a string value…therefor, won’t be useful for me?

Maybe i’ll try the Weather Underground API…


#7

Yeah, the Weather Underground API worked well… nicely documented too!

Expression: $weather.hourly10day.hourly_forecast.pop[0]
“is greater than”
value = 70