Skip to content

Commit

Permalink
fix: fix blocking call in amazon_search function
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Jun 9, 2024
1 parent 926fbdc commit d62686c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ def amazon_search(
if server_response == "OK" and data[0] is not None:
count += len(data[0].split())
_LOGGER.debug("Amazon delivered email(s) found: %s", count)
get_amazon_image(data[0], account, image_path, hass, amazon_image_name)
hass.async_add_executor_job(get_amazon_image, data[0], account, image_path, hass, amazon_image_name)

return count

Expand Down

0 comments on commit d62686c

Please sign in to comment.