diff --git a/custom_components/mail_and_packages/const.py b/custom_components/mail_and_packages/const.py index f36f7404..8696c593 100644 --- a/custom_components/mail_and_packages/const.py +++ b/custom_components/mail_and_packages/const.py @@ -91,6 +91,7 @@ "Dostarczono:", "Geliefert:", "Livré", + "Entregado:", ] AMAZON_SHIPMENT_TRACKING = [ "shipment-tracking", @@ -132,7 +133,7 @@ "Per tracciare il tuo pacco", "View or manage order", "Acompanhar", - "Sguimiento", + "Seguimiento", "Verfolge deine(n) Artikel", "Lieferung verfolgen", "Ihr Paket verfolgen", diff --git a/custom_components/mail_and_packages/helpers.py b/custom_components/mail_and_packages/helpers.py index 3eb1313d..b6a57ad6 100644 --- a/custom_components/mail_and_packages/helpers.py +++ b/custom_components/mail_and_packages/helpers.py @@ -810,10 +810,12 @@ def resize_images(images: list, width: int, height: int) -> list: with open(image, "rb") as fd_img: try: img = Image.open(fd_img) - img.thumbnail((width, height), resample=Image.LANCZOS) + img.thumbnail((width, height), resample=Image.Resampling.LANCZOS) # Add padding as needed - img = ImageOps.pad(img, (width, height), method=Image.LANCZOS) + img = ImageOps.pad( + img, (width, height), method=Image.Resampling.LANCZOS + ) # Crop to size img = img.crop((0, 0, width, height)) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index e285d492..f51aa451 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -869,7 +869,7 @@ async def test_amazon_search_results(hass, mock_imap_amazon_shipped): result = amazon_search( mock_imap_amazon_shipped, "test/path", hass, "testfilename.jpg" ) - assert result == 65 + assert result == 78 @pytest.mark.asyncio @@ -879,7 +879,7 @@ async def test_amazon_search_delivered( result = amazon_search( mock_imap_amazon_delivered, "test/path", hass, "testfilename.jpg" ) - assert result == 65 + assert result == 78 assert mock_download_img.called @@ -890,7 +890,7 @@ async def test_amazon_search_delivered_it( result = amazon_search( mock_imap_amazon_delivered_it, "test/path", hass, "testfilename.jpg" ) - assert result == 65 + assert result == 78 @pytest.mark.asyncio