Remove passing loop into sleep in SamsungTV (#66030)

This commit is contained in:
Franck Nijhof 2022-02-07 20:08:54 +01:00 committed by GitHub
parent 721d711762
commit 4732e37005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ class SamsungTVDevice(MediaPlayerEntity):
for digit in media_id:
await self.hass.async_add_executor_job(self.send_key, f"KEY_{digit}")
await asyncio.sleep(KEY_PRESS_TIMEOUT, self.hass.loop)
await asyncio.sleep(KEY_PRESS_TIMEOUT)
await self.hass.async_add_executor_job(self.send_key, "KEY_ENTER")
def _wake_on_lan(self) -> None:

View File

@ -713,9 +713,9 @@ async def test_play_media(hass, remote):
asyncio_sleep = asyncio.sleep
sleeps = []
async def sleep(duration, loop):
async def sleep(duration):
sleeps.append(duration)
await asyncio_sleep(0, loop=loop)
await asyncio_sleep(0)
await setup_samsungtv(hass, MOCK_CONFIG)
with patch("asyncio.sleep", new=sleep):