izacus / hass-swissweather

HomeAssistant module for MeteoSwiss
Apache License 2.0
13 stars 2 forks source link

Polling frequency high #7

Closed maxx-maurer closed 2 weeks ago

maxx-maurer commented 1 month ago

Looking at my network traffic, I see that this sensor is polling the data servers approximately every 20 seconds, twice (prognosis and current data). This leads to high unnecessary traffic on data.geo.admin.ch and app-prod-ws.meteoswiss-app.ch. It would be nice to a) reduce (e.g. every 5 min) or then give the option to define the update frequency. In any case: Thanks for this integration. Much appreciated.

chriszuercher commented 3 weeks ago

I noticed the same and agree to @maxx-maurer propsal , the default should be much lower like 5 minutes. Configuration of this is nice to have if the period has a reasonable default.

Aside of this I really like this integration and use it i multiple installations. Thank you for your eork!

izacus commented 2 weeks ago

Hmm, interesting, the interval should be around 60mins, not 20 seconds. Let me take a look.

izacus commented 2 weeks ago

Should be fixed in b0ab2207645eb6864ac05561ef7c5409b26fbc1f, I'll push an update after I test/soak it for a bit.

maxx-maurer commented 2 weeks ago

Just updated and works well! Polling is now indeed much lower (as far I can tell from the last 30 Min). Thanks for this fast fix. Much appreciated as this is really a very useful and cool integration. max

Sent with Proton Mail secure email.

On Wednesday, 28 August 2024 at 08:59, Jernej Virag @.***> wrote:

Should be fixed in b0ab220, I'll push an update after I test/soak it for a bit.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>