-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid calling yr update every second for a minute ones every hour #16731
Conversation
@@ -91,7 +91,7 @@ | |||
async_add_entities(dev) | |||
|
|||
weather = YrData(hass, coordinates, forecast, dev) | |||
async_track_utc_time_change(hass, weather.updating_devices, minute=31) | |||
async_track_utc_time_change(hass, weather.updating_devices, minute=31, second=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
omg. |
I wonder if we should change the defaults on this function. If you pass in minute, seconds defaults to 0. |
It is not fetching new data from the server that often, but it is iterating over the self.data dict. Yeah, it might be a good idea to change the default. |
Oh, it's throttled, good. Great catch |
Removing it from milestone as it's not critical. |
Description:
Avoid calling yr update every second for a minute ones every hour
Checklist:
tox
. Your PR cannot be merged unless tests pass