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:
parent
52a94dd2ac
commit
02ef7d445d
15 changed files with 79 additions and 17 deletions
|
@ -272,6 +272,7 @@ class HKDevice:
|
|||
self.hass,
|
||||
self.async_update_available_state,
|
||||
timedelta(seconds=BLE_AVAILABILITY_CHECK_INTERVAL),
|
||||
f"HomeKit Controller {self.unique_id} BLE availability check poll",
|
||||
)
|
||||
)
|
||||
# BLE devices always get an RSSI sensor as well
|
||||
|
@ -286,7 +287,10 @@ class HKDevice:
|
|||
# in the log about concurrent polling.
|
||||
self.config_entry.async_on_unload(
|
||||
async_track_time_interval(
|
||||
self.hass, self.async_request_update, self.pairing.poll_interval
|
||||
self.hass,
|
||||
self.async_request_update,
|
||||
self.pairing.poll_interval,
|
||||
f"HomeKit Controller {self.unique_id} availability check poll",
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue