Skip to content

Commit

Permalink
(Fixed) changed time.sleep() to asyncio.sleep() in config_flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav authored and IATkachenko committed Jan 27, 2025
1 parent ccf8296 commit c59dd3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/ha_tion_btle/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import logging
import datetime
import time
import asyncio

import bleak
import tion_btle
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c59dd3c

Please sign in to comment.