Use EntityFeature enum in components (u**) (#69462)
This commit is contained in:
parent
95fb4695e4
commit
75eec850c1
6 changed files with 66 additions and 98 deletions
|
@ -8,7 +8,7 @@ from pyunifiprotect.api import ProtectApiClient
|
|||
from pyunifiprotect.data import Camera as UFPCamera, StateType
|
||||
from pyunifiprotect.data.devices import CameraChannel
|
||||
|
||||
from homeassistant.components.camera import SUPPORT_STREAM, Camera
|
||||
from homeassistant.components.camera import Camera, CameraEntityFeature
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -134,7 +134,7 @@ class ProtectCamera(ProtectDeviceEntity, Camera):
|
|||
None if disable_stream else rtsp_url
|
||||
)
|
||||
self._attr_supported_features: int = (
|
||||
SUPPORT_STREAM if self._stream_source else 0
|
||||
CameraEntityFeature.STREAM if self._stream_source else 0
|
||||
)
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue