Allow passing an optional name to async_track_time_interval (#90244)

* Allow passing an optional name to async_track_time_interval

This is the same idea as passing a name to asyncio.create_task which
makes it easier to track down bugs

* more

* short

* still cannot find it

* add a few more

* test
This commit is contained in:
J. Nick Koston 2023-03-25 04:11:14 -10:00 committed by GitHub
parent 52a94dd2ac
commit 02ef7d445d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 79 additions and 17 deletions

View file

@ -38,7 +38,7 @@ class AugustSubscriberMixin:
def _async_setup_listeners(self):
"""Create interval and stop listeners."""
self._unsub_interval = async_track_time_interval(
self._hass, self._async_refresh, self._update_interval
self._hass, self._async_refresh, self._update_interval, "august refresh"
)
@callback