mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 02:51:40 +02:00
Fix keymitt_ble RuntimeWarning (#97729)
This commit is contained in:
committed by
Franck Nijhof
parent
79486f1880
commit
53ee178545
@@ -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
|
||||
|
Reference in New Issue
Block a user