#Weather forecast with templating, and passing daily or hourly forcast type

1 messages · Page 1 of 1 (latest)

lyric gust
#

I have this script: https://pastebin.com/UUptyeYJ which I plan to call in my various tts, persistant notification, notify actions/services.
But for some reason, Im entering into very end else statement weather forecast is unavailable.
Can you please check if Im pulling data from correct array etc? or is there any blueprint for this weather get_forecasts which I can use in this way to pass as variable input weather is daily or hourly, and to get some meaningful sentence

north stump
#

weather_data.forecast is incorrect

#

You need to use
weather_data['weather.home'].forecast

lyric gust
#

Yes, but the story is much more cmplex then I thought.

I want to have some kind of a script which will pull the weather data for current, today, and tomorrow weather.
Then to calclulate min/max temperatures, to have flag is_rainy, to have a flag if it weather getting worse in enxt 4-6 hours
SO basically preety much information which I can later use in notifications or tts

#
{
"current": {
"temp": "20°C",
"wind_speed": 11.2,
"wind_description": "normal",
"condition": "partly cloudy",
"precipitation": 0,
"precipitation_probability": 0,
"is_rainy": false
},
"today": {
"min_temp": "18.0°C",
"max_temp": "22.0°C",
"wind_speed": 11.2,
"wind_description": "normal",
"condition": "partly cloudy",
"precipitation": 0,
"precipitation_probability": 0,
"is_rainy": false,
"worsening": false,
"warning": """"
}
}

Something like this but the data is not correct 🙂

lyric gust
#

can someone take a look on this? @north stump do you maybe know where I can find these set of data from some integration or blueprint? tnx

north stump