Fix keymitt_ble RuntimeWarning (#97729)
parent
b16254a0de
commit
99145d46d2
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue