Ezviz image entity cleanup (#96548)

* Update image.py

* Inheratance format
pull/96775/head
Renier Moorcroft 2023-07-17 08:30:17 +02:00 committed by GitHub
parent 33d2dd3797
commit d553a749a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -21,7 +21,6 @@ from .coordinator import EzvizDataUpdateCoordinator
from .entity import EzvizEntity
_LOGGER = logging.getLogger(__name__)
GET_IMAGE_TIMEOUT = 10
IMAGE_TYPE = ImageEntityDescription(
key="last_motion_image",
@ -52,7 +51,7 @@ class EzvizLastMotion(EzvizEntity, ImageEntity):
self, hass: HomeAssistant, coordinator: EzvizDataUpdateCoordinator, serial: str
) -> None:
"""Initialize a image entity."""
super().__init__(coordinator, serial)
EzvizEntity.__init__(self, coordinator, serial)
ImageEntity.__init__(self, hass)
self._attr_unique_id = f"{serial}_{IMAGE_TYPE.key}"
self.entity_description = IMAGE_TYPE