Address homekit_controller feedback on #32212 and #32213 (#32228)

This commit is contained in:
Jc2k 2020-02-27 01:10:05 +00:00 committed by GitHub
parent f26826d949
commit d207c37c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ class HKDevice:
def add_watchable_characteristics(self, characteristics):
"""Add (aid, iid) pairs that we need to poll."""
self.watchable_characteristics.extend(characteristics)
self.hass.add_job(self.pairing.subscribe(characteristics))
self.hass.async_create_task(self.pairing.subscribe(characteristics))
def remove_watchable_characteristics(self, accessory_id):
"""Remove all pollable characteristics by accessory id."""

View File

@ -103,7 +103,7 @@ async def setup_test_accessories(hass, accessories):
)
config_entry.add_to_hass(hass)
await config_entry.async_setup(hass)
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
return config_entry, pairing