Skip to content

Commit

Permalink
Fix HA camera deprecated constant (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecode authored May 4, 2024
1 parent 2651596 commit 40695fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions custom_components/dahua/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_platform
from homeassistant.components.camera import SUPPORT_STREAM, Camera
from homeassistant.components.camera import Camera, CameraEntityFeature

from custom_components.dahua import DahuaDataUpdateCoordinator
from custom_components.dahua.entity import DahuaBaseEntity
Expand Down Expand Up @@ -254,8 +254,8 @@ async def async_camera_image(self, width: int | None = None, height: int | None

@property
def supported_features(self):
"""Return supported features."""
return SUPPORT_STREAM
"""Flag supported features."""
return CameraEntityFeature.STREAM

async def stream_source(self):
"""Return the RTSP stream source."""
Expand Down Expand Up @@ -325,7 +325,7 @@ async def async_adjustfocus(self, focus: str, zoom: str):
""" Handles the service call from SERVICE_SET_INFRARED_MODE to set zoom and focus """
await self._coordinator.client.async_adjustfocus_v1(focus, zoom)
await self._coordinator.async_refresh()

async def async_set_privacy_masking(self, index: int, enabled: bool):
""" Handles the service call from SERVICE_SET_PRIVACY_MASKING to control the privacy masking """
await self._coordinator.client.async_setprivacymask(index, enabled)
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Dahua",
"hacs": "1.6.0",
"homeassistant": "2021.7.0",
"homeassistant": "2024.1.0",
"render_readme": true
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
homeassistant~=2021.7.0
homeassistant~=2024.1.0
ha-ffmpeg==3.0.2
voluptuous~=0.12.1
aiohttp~=3.7.4.post0
Expand Down

0 comments on commit 40695fc

Please sign in to comment.