From 82fd3ec31426be8245dd63b5218587fb16426573 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 29 Dec 2023 04:03:22 -1000 Subject: [PATCH] Fix camera supported_features to return CameraEntityFeature (#589) related issue https://github.com/home-assistant/core/issues/106522 --- custom_components/frigate/camera.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/frigate/camera.py b/custom_components/frigate/camera.py index f82fa5d1..9b376c79 100644 --- a/custom_components/frigate/camera.py +++ b/custom_components/frigate/camera.py @@ -235,12 +235,12 @@ def extra_state_attributes(self) -> dict[str, str]: } @property - def supported_features(self) -> int: + def supported_features(self) -> CameraEntityFeature: """Return supported features of this camera.""" if not self._attr_is_streaming: - return 0 + return CameraEntityFeature(0) - return cast(int, CameraEntityFeature.STREAM) + return CameraEntityFeature.STREAM async def async_camera_image( self, width: int | None = None, height: int | None = None @@ -351,9 +351,9 @@ def device_info(self) -> dict[str, Any]: } @property - def supported_features(self) -> int: + def supported_features(self) -> CameraEntityFeature: """Return supported features of this camera.""" - return cast(int, CameraEntityFeature.STREAM) + return CameraEntityFeature.STREAM async def async_camera_image( self, width: int | None = None, height: int | None = None