diff --git a/custom_components/ha_tion_btle/config_flow.py b/custom_components/ha_tion_btle/config_flow.py index bba41df..53af1a9 100644 --- a/custom_components/ha_tion_btle/config_flow.py +++ b/custom_components/ha_tion_btle/config_flow.py @@ -3,7 +3,7 @@ import logging import datetime -import time +import asyncio import bleak import tion_btle @@ -165,7 +165,7 @@ async def async_step_pair(self, input): await _tion.pair() # We should sleep a bit, because immediately connection will cause device disconnected exception while # enabling notifications - time.sleep(3) + await asyncio.sleep(3) result = await _tion.get() except Exception as e: