Todays Weather Announcement - Rain vs Snow


#1

I’m working on creating a piston that will announce (right now its a push notification, eventually text to speech over Sonos) the weather when my motion sensors first sense motion in the morning. I think I’ve got it mostly setup, but I’m not quite sure how to differentiate between rain and snow.

For snow, that’s an easy one - $weather.forecast10day.forecast.simpleforecast.forecastday.snow_allday.[0]
But for rain, there is no explicit way of returning rain (vs snow). The closest I can find is $weather.forecast10day.forecast.simpleforecast.forecastday.qpf_allday.[0]


#2

Instead of snow try precipitation if I remember correctly tgat is rain


#3

@Gopack2 precip would include both snow and rain, no?

If there is no way to get just rain, I guess the workaround would be to determine rain by evaluating if there is precip but no snow, though that seems rather inefficient


#4

Take it you don’t like the text option?

https://wiki.webcore.co/Weather#Forecast_Text

[Plentiful sunshine. High 89F. Winds ESE at 5 to 10 mph., Mostly clear. Low 68F. Winds light and variable., Sunny. High 92F. Winds SSW at 5 to 10 mph., A mostly clear sky. Low 68F. Winds light and variable., Sunny skies. High 94F. Winds S at 10 to 15 mph., Clear skies. Low 71F. Winds SSE at 5 to 10 mph., Partly cloudy skies. High 94F. Winds SSW at 10 to 15 mph., Clear. Low 74F. Winds S at 10 to 15 mph.]

#5

EDIT: using $weather.forecast.forecast.txt_forecast.forecastday.fcttext_metric.[parameter] will return the next 1/3 of the day, so that should work! Playing with the time that the forecast is checked, as well as storing in parameters will allow me to get very close to what i want.


#6

I use contains() to match the simple conditions with ‘rain’ or ‘thunderstorm’. For snow I match ‘snow’ or ‘flurries’ or ‘sleet’. For sunny… ‘sun’ (which covers sunny, mostly sunny, etc) and ‘clear’.