From d207c37c33fc1c2cec16edda5577afd57aae2571 Mon Sep 17 00:00:00 2001 From: Jc2k Date: Thu, 27 Feb 2020 01:10:05 +0000 Subject: [PATCH] Address homekit_controller feedback on #32212 and #32213 (#32228) --- homeassistant/components/homekit_controller/connection.py | 2 +- tests/components/homekit_controller/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homekit_controller/connection.py b/homeassistant/components/homekit_controller/connection.py index 493ef3ccb866d9..a84c318b6b3c90 100644 --- a/homeassistant/components/homekit_controller/connection.py +++ b/homeassistant/components/homekit_controller/connection.py @@ -125,7 +125,7 @@ def remove_pollable_characteristics(self, accessory_id): 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.""" diff --git a/tests/components/homekit_controller/common.py b/tests/components/homekit_controller/common.py index 0a57450a740d53..f6f2490e48b1ef 100644 --- a/tests/components/homekit_controller/common.py +++ b/tests/components/homekit_controller/common.py @@ -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