Skip to content

Commit

Permalink
fix: clean up amazon images (#986)
Browse files Browse the repository at this point in the history
* fix: clean up amazon images

* fix test
  • Loading branch information
firstof9 authored Nov 1, 2024
1 parent 2964177 commit 843b410
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,8 @@ def get_count(

# Return Amazon delivered info
if sensor_type == AMAZON_DELIVERED:
_LOGGER.debug("Cleaning up amazon images...")
cleanup_images(f"{image_path}amazon/")
result[ATTR_COUNT] = amazon_search(
account, image_path, hass, amazon_image_name, amazon_domain
)
Expand Down
1 change: 0 additions & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ async def test_process_emails_bad(hass, mock_imap_no_email, mock_update):
data=FAKE_CONFIG_DATA_BAD,
)

entry.version = 2
entry.add_to_hass(hass)
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
Expand Down

0 comments on commit 843b410

Please sign in to comment.