diff --git a/homeassistant/components/doorbird/camera.py b/homeassistant/components/doorbird/camera.py index fce76a65ff5..5983e639851 100644 --- a/homeassistant/components/doorbird/camera.py +++ b/homeassistant/components/doorbird/camera.py @@ -96,9 +96,8 @@ class DoorBirdCamera(DoorBirdEntity, Camera): self._stream_url = stream_url self._attr_name = name self._last_image: bytes | None = None - self._attr_supported_features = ( - CameraEntityFeature.STREAM if self._stream_url else 0 - ) + if self._stream_url: + self._attr_supported_features = CameraEntityFeature.STREAM self._interval = interval self._last_update = datetime.datetime.min self._attr_unique_id = f"{self._mac_addr}_{camera_id}" diff --git a/homeassistant/components/evohome/climate.py b/homeassistant/components/evohome/climate.py index 0ec64c6b2b1..4594268623c 100644 --- a/homeassistant/components/evohome/climate.py +++ b/homeassistant/components/evohome/climate.py @@ -321,9 +321,8 @@ class EvoController(EvoClimateEntity): self._attr_preset_modes = [ TCS_PRESET_TO_HA[m] for m in modes if m in list(TCS_PRESET_TO_HA) ] - self._attr_supported_features = ( - ClimateEntityFeature.PRESET_MODE if self._attr_preset_modes else 0 - ) + if self._attr_preset_modes: + self._attr_supported_features = ClimateEntityFeature.PRESET_MODE async def async_tcs_svc_request(self, service: str, data: dict[str, Any]) -> None: """Process a service request (system mode) for a controller. diff --git a/homeassistant/components/generic/camera.py b/homeassistant/components/generic/camera.py index 961d3cecfb7..b039b32d73d 100644 --- a/homeassistant/components/generic/camera.py +++ b/homeassistant/components/generic/camera.py @@ -165,9 +165,8 @@ class GenericCamera(Camera): self._stream_source.hass = hass self._limit_refetch = device_info[CONF_LIMIT_REFETCH_TO_URL_CHANGE] self._attr_frame_interval = 1 / device_info[CONF_FRAMERATE] - self._attr_supported_features = ( - CameraEntityFeature.STREAM if self._stream_source else 0 - ) + if self._stream_source: + self._attr_supported_features = CameraEntityFeature.STREAM self.content_type = device_info[CONF_CONTENT_TYPE] self.verify_ssl = device_info[CONF_VERIFY_SSL] if device_info.get(CONF_RTSP_TRANSPORT):