Skip to content

Commit

Permalink
Fix camera supported_features to return CameraEntityFeature (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 29, 2023
1 parent e385db8 commit 82fd3ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/frigate/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 82fd3ec

Please sign in to comment.