diff --git a/custom_components/mail_and_packages/camera.py b/custom_components/mail_and_packages/camera.py index 12f16de2..910ee7e3 100644 --- a/custom_components/mail_and_packages/camera.py +++ b/custom_components/mail_and_packages/camera.py @@ -1,4 +1,6 @@ """Camera that loads a picture from a local file.""" +from __future__ import annotations + import logging import os @@ -104,7 +106,9 @@ def __init__( else config.data.get(CONF_CUSTOM_IMG_FILE) ) - async def async_camera_image(self): + async def async_camera_image( + self, width: int | None = None, height: int | None = None + ) -> bytes | None: """Return image response.""" try: with open(self._file_path, "rb") as file: diff --git a/custom_components/mail_and_packages/helpers.py b/custom_components/mail_and_packages/helpers.py index a91978e0..dea25d2b 100644 --- a/custom_components/mail_and_packages/helpers.py +++ b/custom_components/mail_and_packages/helpers.py @@ -9,7 +9,7 @@ import os import quopri import re -import subprocess +import subprocess # nosec import uuid from email.header import decode_header from shutil import copyfile, copytree, which