Aemet integration failing because of "Too many API requests"

Hi,

I have been using the AEMET weather integration for a while. The last week, I started running into issues. The integration works but sometimes it gives the error:

  • Error fetching aemet data: [Errno 104] Connection reset by peer
  • Error fetching aemet data: Too many API requests

If I reload the integration, it works well for a while until the error is raised again. I generated a new API key and reinstall the integration but the issue remains. Is someone experiencing the same issue? I was checking the code and the update is done every 10 minutes. I really not need need to fetch weather data that fast, with one hour would be enough. Can this be configured? It seems to me that is hardcoded in the coordinator.py file of the integration.

imagen

Best regards,
Pablo

They may have changed their API limit. You can slow it down by following this:

Thank you so much for the help.

Unfortunately (and I do not why), this didn’t work:

alias: Update AEMET Weather Hourly
trigger:
  - platform: time_pattern
    hours: "/1"  
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id: weather.aemet

I get no log message or anything, and the entity data is not updated. I tried with sensors from the integration without luck.

They way I could make it work even though it seems a not very clean workaround is:

alias: Update AEMET Weather Hourly
description: ""
triggers:
  - trigger: time_pattern
    hours: "/1"
conditions: []
actions:
  - action: homeassistant.reload_config_entry
    metadata: {}
    data: {}
    target:
      entity_id: weather.aemet
mode: restart

Thank you for the assistance.