Use shorthand attributes in Motion eye (#99596)
parent
cab0bde37b
commit
f1bb7c25db
|
@ -143,6 +143,10 @@ async def async_setup_entry(
|
|||
class MotionEyeMjpegCamera(MotionEyeEntity, MjpegCamera):
|
||||
"""motionEye mjpeg camera."""
|
||||
|
||||
_attr_brand = MOTIONEYE_MANUFACTURER
|
||||
# motionEye cameras are always streaming or unavailable.
|
||||
_attr_is_streaming = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
config_entry_id: str,
|
||||
|
@ -158,9 +162,6 @@ class MotionEyeMjpegCamera(MotionEyeEntity, MjpegCamera):
|
|||
self._surveillance_password = password
|
||||
self._motion_detection_enabled: bool = camera.get(KEY_MOTION_DETECTION, False)
|
||||
|
||||
# motionEye cameras are always streaming or unavailable.
|
||||
self._attr_is_streaming = True
|
||||
|
||||
MotionEyeEntity.__init__(
|
||||
self,
|
||||
config_entry_id,
|
||||
|
@ -249,11 +250,6 @@ class MotionEyeMjpegCamera(MotionEyeEntity, MjpegCamera):
|
|||
)
|
||||
super()._handle_coordinator_update()
|
||||
|
||||
@property
|
||||
def brand(self) -> str:
|
||||
"""Return the camera brand."""
|
||||
return MOTIONEYE_MANUFACTURER
|
||||
|
||||
@property
|
||||
def motion_detection_enabled(self) -> bool:
|
||||
"""Return the camera motion detection status."""
|
||||
|
|
Loading…
Reference in New Issue