Skip to content

Commit

Permalink
fix: Add timeout to last_called (#2140)
Browse files Browse the repository at this point in the history
closes #2132
  • Loading branch information
mwav3 committed Dec 18, 2023
1 parent 86a7ffe commit f31dad8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,8 @@ async def update_last_called(login_obj, last_called=None, force=False):
"""
if not last_called or not (last_called and last_called.get("summary")):
try:
last_called = await AlexaAPI.get_last_device_serial(login_obj)
async with async_timeout.timeout(10):
last_called = await AlexaAPI.get_last_device_serial(login_obj)
except TypeError:
_LOGGER.debug(
"%s: Error updating last_called: %s",
Expand Down

0 comments on commit f31dad8

Please sign in to comment.