Fix keymitt_ble RuntimeWarning (#97729)

pull/97759/head
Marc Mueller 2023-08-04 09:34:04 +02:00 committed by GitHub
parent b16254a0de
commit 99145d46d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ class MicroBotConfigFlow(ConfigFlow, domain=DOMAIN):
await self._client.connect(init=True)
return self.async_show_form(step_id="link")
if not self._client.is_connected():
if not await self._client.is_connected():
errors["base"] = "linking"
else:
await self._client.disconnect()

View File

@ -77,6 +77,6 @@ class MockMicroBotApiClientFail:
async def disconnect(self):
"""Mock disconnect."""
def is_connected(self):
async def is_connected(self):
"""Mock disconnected."""
return False