custom-components/weatheralerts

Thousands of DNS Queries Per Day Made to "api.weather.gov"

jhemmond opened this issue · 2 comments

My AdGuard local DNS shows that every 30 seconds two DNS requests are fired to api.weather.gov

https://imgur.com/a/TVt6e6K

This just happened last week out of the blue. Please let me know if I can help with anything specific. My setup is:

  • HAOS 8.4, CORE 2022.8.4 on x86
  • Weatheralerts was installed through HACS

This is not a bug or "issue" per se, it's just the way the integration works. The weatheralerts integration polls the api.weather.gov NWS weather alerts API URL for active weather alerts. By default, the integration polls the API every 30 seconds. This polling interval can be changed by changing the scan_interval setting in the YAML package, if you are using the YAML package, or by adding the scan_interval setting to your weatheralerts YAML configuration. If you live in an area where you don't get severe weather, like tornados or flash floods, you can probably increase the scan_interval setting to decrease the number of times per day the integration polls the NWS weather alerts API. If you do live in an area with the potential for severe weather, I recommend leaving it set at the default 30 seconds.

As long as AdGuard isn't blocking the DNS queries or the http requests to api.weather.gov, there isn't any problem and it looks like everything is working as it should be.

Thank you for the detailed answer!
Do you mind sharing where to add the scan_interval into the YAML package?
I searched my weatheralerts_1.yaml and couldn't find anything.

EDIT: I found the answer in the documentations 👍