|
6 | 6 |
|
7 | 7 | from homeassistant.core import HomeAssistant |
8 | 8 | from homeassistant.helpers import entity_platform |
9 | | -from homeassistant.components.camera import SUPPORT_STREAM, Camera |
| 9 | +from homeassistant.components.camera import Camera, CameraEntityFeature |
10 | 10 |
|
11 | 11 | from custom_components.dahua import DahuaDataUpdateCoordinator |
12 | 12 | from custom_components.dahua.entity import DahuaBaseEntity |
@@ -254,8 +254,8 @@ async def async_camera_image(self, width: int | None = None, height: int | None |
254 | 254 |
|
255 | 255 | @property |
256 | 256 | def supported_features(self): |
257 | | - """Return supported features.""" |
258 | | - return SUPPORT_STREAM |
| 257 | + """Flag supported features.""" |
| 258 | + return CameraEntityFeature.STREAM |
259 | 259 |
|
260 | 260 | async def stream_source(self): |
261 | 261 | """Return the RTSP stream source.""" |
@@ -325,7 +325,7 @@ async def async_adjustfocus(self, focus: str, zoom: str): |
325 | 325 | """ Handles the service call from SERVICE_SET_INFRARED_MODE to set zoom and focus """ |
326 | 326 | await self._coordinator.client.async_adjustfocus_v1(focus, zoom) |
327 | 327 | await self._coordinator.async_refresh() |
328 | | - |
| 328 | + |
329 | 329 | async def async_set_privacy_masking(self, index: int, enabled: bool): |
330 | 330 | """ Handles the service call from SERVICE_SET_PRIVACY_MASKING to control the privacy masking """ |
331 | 331 | await self._coordinator.client.async_setprivacymask(index, enabled) |
|
0 commit comments