AccuWeather pulling yesterday’s forecast

Hi,

I’m using the weather forecasts action to get a daily forecast from AccuWeather:

  • trigger:
    - platform: time_pattern
    hours: /1
    - platform: event
    event_type: event_template_reload
    - platform: homeassistant
    event: start
    action:
    - service: weather.get_forecasts
    data:
    type: daily
    target:
    entity_id: weather.home_2
    response_variable: daily
    sensor:
    - name: Weather daily forecast
    unique_id: weather_daily_forecast
    state: “{{ now().isoformat() }}”
    attributes:
    forecast: “{{daily[‘weather.home_2’].forecast }}”

I’ve noticed that first thing in the morning, it’s still using yeaterday’s forecast as today’s:

Any ideas how to change this?

Thanks

Guyan

Did you fix it? I’m having the same problem.
Any ideas?

No. I haven’t got anywhere with it yet. It’s less of a problem at this time of year as I use it most for when there’s a higher temperature forecast.

Check your Logs. Accuweather has a limit on the number of API calls per day (50 calls per 24 hour period* according to their site). You should see entries in your logs indicating that there was an error fetching Accuweather data when it starts failing.

If you’re using an automation to fetch the forecast, I strongly suggest you disable polling in the integration settings (Accuweather integration page > 3 dots under Service > turn off “Enable polling for updates”) if you haven’t already done so. If you didn’t do this, then both the integration and your automation are calling the API and you’re running into limits.

Or, the simpler solution would be to change the trigger to hours: /2 or higher, because there’s no need to fetch daily forecasts 24 times a day.

*Note that this is per 24 hour period, not daily. It doesn’t reset at midnight but keeps a rolling count of the number of calls you made in the past 24 hours from now. Simply disabling that automation (or the entire integration) for 24 hours should bring your counts back to 0.

Thanks. Didn’t think of that. I’ve changed it to 2 hourly and I’ll see what happens.

1 Like

Remember to also disable polling, otherwise you might still run into issues.