Skip to content

Commit

Permalink
Set update interval to ~10 minutes
Browse files Browse the repository at this point in the history
The upstream station data seems to be updating every 10 minutes at the most common. Sync to that timing.
  • Loading branch information
izacus committed Aug 28, 2024
1 parent 9b146d6 commit 046968d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/swissweather/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry) -> None:
self._station_code = config_entry.data.get(CONF_STATION_CODE)
self._post_code = config_entry.data[CONF_POST_CODE]
self._client = MeteoClient()
update_interval = timedelta(minutes=randrange(55, 65))
update_interval = timedelta(minutes=10)
super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=update_interval,
always_update=False)

Expand Down

0 comments on commit 046968d

Please sign in to comment.