From f1bb7c25db1dcc2f06717add2772d6989bf18750 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 4 Sep 2023 15:18:22 +0200 Subject: [PATCH] Use shorthand attributes in Motion eye (#99596) --- homeassistant/components/motioneye/camera.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/motioneye/camera.py b/homeassistant/components/motioneye/camera.py index 683308e081c..fd3f0ec86c0 100644 --- a/homeassistant/components/motioneye/camera.py +++ b/homeassistant/components/motioneye/camera.py @@ -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."""