Fix keymitt_ble RuntimeWarning (#97729)

This commit is contained in:
Marc Mueller 2023-08-04 09:34:04 +02:00 committed by Franck Nijhof
parent 79486f1880
commit 53ee178545
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
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