mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 14:30:22 +00:00
Improve type hints in demo [1/3] (#77180)
This commit is contained in:
@@ -39,7 +39,7 @@ class DemoImageProcessingAlpr(ImageProcessingAlprEntity):
|
||||
"""Initialize demo ALPR image processing entity."""
|
||||
super().__init__()
|
||||
|
||||
self._name = name
|
||||
self._attr_name = name
|
||||
self._camera = camera_entity
|
||||
|
||||
@property
|
||||
@@ -52,11 +52,6 @@ class DemoImageProcessingAlpr(ImageProcessingAlprEntity):
|
||||
"""Return minimum confidence for send events."""
|
||||
return 80
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the entity."""
|
||||
return self._name
|
||||
|
||||
def process_image(self, image: Image) -> None:
|
||||
"""Process image."""
|
||||
demo_data = {
|
||||
@@ -76,7 +71,7 @@ class DemoImageProcessingFace(ImageProcessingFaceEntity):
|
||||
"""Initialize demo face image processing entity."""
|
||||
super().__init__()
|
||||
|
||||
self._name = name
|
||||
self._attr_name = name
|
||||
self._camera = camera_entity
|
||||
|
||||
@property
|
||||
@@ -89,11 +84,6 @@ class DemoImageProcessingFace(ImageProcessingFaceEntity):
|
||||
"""Return minimum confidence for send events."""
|
||||
return 80
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the entity."""
|
||||
return self._name
|
||||
|
||||
def process_image(self, image: Image) -> None:
|
||||
"""Process image."""
|
||||
demo_data = [
|
||||
|
||||
Reference in New Issue
Block a user