Use entity class attributes for august (#52744)
This commit is contained in:
parent
12ac666459
commit
d76607e945
5 changed files with 52 additions and 177 deletions
|
@ -35,11 +35,8 @@ class AugustCamera(AugustEntityMixin, Camera):
|
|||
self._session = session
|
||||
self._image_url = None
|
||||
self._image_content = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of this device."""
|
||||
return f"{self._device.device_name} Camera"
|
||||
self._attr_name = f"{device.device_name} Camera"
|
||||
self._attr_unique_id = f"{self._device_id:s}_camera"
|
||||
|
||||
@property
|
||||
def is_recording(self):
|
||||
|
@ -81,8 +78,3 @@ class AugustCamera(AugustEntityMixin, Camera):
|
|||
self._session, timeout=self._timeout
|
||||
)
|
||||
return self._image_content
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Get the unique id of the camera."""
|
||||
return f"{self._device_id:s}_camera"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue