mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Ezviz image entity cleanup (#96548)
* Update image.py * Inheratance format
This commit is contained in:
parent
33d2dd3797
commit
d553a749a0
@ -21,7 +21,6 @@ from .coordinator import EzvizDataUpdateCoordinator
|
|||||||
from .entity import EzvizEntity
|
from .entity import EzvizEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
GET_IMAGE_TIMEOUT = 10
|
|
||||||
|
|
||||||
IMAGE_TYPE = ImageEntityDescription(
|
IMAGE_TYPE = ImageEntityDescription(
|
||||||
key="last_motion_image",
|
key="last_motion_image",
|
||||||
@ -52,7 +51,7 @@ class EzvizLastMotion(EzvizEntity, ImageEntity):
|
|||||||
self, hass: HomeAssistant, coordinator: EzvizDataUpdateCoordinator, serial: str
|
self, hass: HomeAssistant, coordinator: EzvizDataUpdateCoordinator, serial: str
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize a image entity."""
|
"""Initialize a image entity."""
|
||||||
super().__init__(coordinator, serial)
|
EzvizEntity.__init__(self, coordinator, serial)
|
||||||
ImageEntity.__init__(self, hass)
|
ImageEntity.__init__(self, hass)
|
||||||
self._attr_unique_id = f"{serial}_{IMAGE_TYPE.key}"
|
self._attr_unique_id = f"{serial}_{IMAGE_TYPE.key}"
|
||||||
self.entity_description = IMAGE_TYPE
|
self.entity_description = IMAGE_TYPE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user