hello,YAHOO weather forecast how to write?tks
How to predict the future weather!
How to set the option for forecast. What values should be provided for the option.
It doesn’t look like this is working as the proper value for the forecast option is an integer between 0-5 for the number of days. I just set it up to test:
#
# Yahoo Weather Forecasting
#
#
- platform: yweather
forecast: 3
monitored_conditions:
- weather
- temp_min
- temp_max
but it is only retrieving the current weather data and not the forecast entities. They may have changed the format over at Yahoo because going to the API page referenced in the docs and testing it there DOES produce forecast data.
There are other posts here referencing the same problem so an issue would need to be created.
OK, finally have this figured out.
The sensor will only show ONE days forecast at a time. So if you wanted multiple days forecasts, you’d have to have multiple sensor entries, each with a unique name (this is why the name option was added). So to get a three day forecast, you’d have to configure it like so:
#
#
# Yahoo Weather Forecasting
#
#
- platform: yweather
forecast: 1
name: day1
monitored_conditions:
- weather
- temp_min
- temp_max
- platform: yweather
forecast: 2
name: day2
monitored_conditions:
- weather
- temp_min
- temp_max
- platform: yweather
forecast: 3
name: day3
monitored_conditions:
- weather
- temp_min
- temp_max
This would result in sensors that look like this in your dev states panel:
Then you can just put these sensors in a group card and give them appropriate names using customize. Keep in mind that you can only use the three listed monitored conditions with forecast:
- condition
- temp_min
- temp_max
NOTE: I have created a pull request to update the docs.
thank you very much!!!
Hello there! What if the Yahoo! weather API should be added?
I’m not sure I understand your question.
A couple of things:
- You don’t need an api key for Yahoo Weather.
- You should never post any API keys or personal data in any forums, including this one. Just replace the key when giving examples with the word “REDACTED”.
- woeid is optional and only necessary if you are looking for weather in a location other than your home. If you just want your home weather, as long as you have your latitude and longitude specified in your configuration.yaml, yweather will use that.
- units is not an option, so you don’t need to include it.
- When posting code, highlight the code and select the preformatted text button as shown in the image below. That will preserve all the formatting and spaces correctly.
Sorry, the first time the code, thank you for your reply!
No problem, that’s why I am here. I’m glad I could help.
thank you!!