Understanding the $weather.forecast.forecast.txt_forecast.forecastday.fcttext function


#1

1) Give a description of the problem
Trying to figure out a way to pull subset strings out of a larger string. The Weather function $weather.forecast.forecast.txt_forecast.forecastday.fcttext gives a three day forecast, day and night with a separator of “.,” between each day and each night’s forecast. I want to pull out each day and night and announce via TTS. I can use the functions Indexof() and mid() like in my example piston below to get to the first instance of “.,” but can’t figure out how to use functions to pick a part the three day forecast and break into three strings of tomorrow (the one i’m interested in), the next, and the next)

An Example 3 day forecast: [Periods of rain. High 47F. Winds N at 10 to 15 mph. Chance of rain 100%. Rainfall near a half an inch., Rain showers this evening with clearing overnight. Low 38F. Winds WNW at 5 to 10 mph. Chance of rain 40%., Partly cloudy skies. High around 55F. Winds W at 5 to 10 mph., Partly cloudy skies early will become overcast later during the night. Slight chance of a rain shower. Low 42F. Winds SE at 5 to 10 mph., A steady rain in the morning. Showers continuing in the afternoon. High 52F. S winds shifting to W at 10 to 15 mph. Chance of rain 80%. Rainfall near a quarter of an inch., A mostly clear sky. Low 33F. Winds WNW at 10 to 15 mph., Partly cloudy skies. High 44F. Winds WNW at 10 to 15 mph., A few clouds from time to time. Low 29F. Winds NW at 5 to 10 mph.]

2) What is the expected behavior?
The time is w. The current weater is x. Today’s forecast is y. Tomorrow’s forecast is z

3) What is happening/not happening?
Not sure how to use function statements to pull out substrings between ".,

**4) Post a Green Snapshot of the piston!


#2

You can add [0] to the end for today, [1] for tonight, [2] for tomorrow morning etc.

If you run this query late in the day, [0] may be tonight, [1] may be tomorrow morning, [2] may be tomorrow night etc

Basically, [0] is the current, and [1] is the next time frame etc


#3

Whoahhhhhhh??? That easy huh, well at least I learned a lot…

Blew%20my%20mind


#4

See also 10-Day Weather Forecast Tiles