mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Bump amcrest version to 1.9.7 (#68055)
This commit is contained in:
parent
57c33a5cf0
commit
38306417ad
@ -52,6 +52,7 @@ from .const import (
|
|||||||
DATA_AMCREST,
|
DATA_AMCREST,
|
||||||
DEVICES,
|
DEVICES,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
|
RESOLUTION_LIST,
|
||||||
SERVICE_EVENT,
|
SERVICE_EVENT,
|
||||||
SERVICE_UPDATE,
|
SERVICE_UPDATE,
|
||||||
)
|
)
|
||||||
@ -76,8 +77,6 @@ RECHECK_INTERVAL = timedelta(minutes=1)
|
|||||||
NOTIFICATION_ID = "amcrest_notification"
|
NOTIFICATION_ID = "amcrest_notification"
|
||||||
NOTIFICATION_TITLE = "Amcrest Camera Setup"
|
NOTIFICATION_TITLE = "Amcrest Camera Setup"
|
||||||
|
|
||||||
RESOLUTION_LIST = {"high": 0, "low": 1}
|
|
||||||
|
|
||||||
SCAN_INTERVAL = timedelta(seconds=10)
|
SCAN_INTERVAL = timedelta(seconds=10)
|
||||||
|
|
||||||
AUTHENTICATION_LIST = {"basic": "basic"}
|
AUTHENTICATION_LIST = {"basic": "basic"}
|
||||||
|
@ -35,6 +35,7 @@ from .const import (
|
|||||||
DATA_AMCREST,
|
DATA_AMCREST,
|
||||||
DEVICES,
|
DEVICES,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
|
RESOLUTION_TO_STREAM,
|
||||||
SERVICE_UPDATE,
|
SERVICE_UPDATE,
|
||||||
SNAPSHOT_TIMEOUT,
|
SNAPSHOT_TIMEOUT,
|
||||||
)
|
)
|
||||||
@ -533,13 +534,14 @@ class AmcrestCam(Camera):
|
|||||||
return
|
return
|
||||||
|
|
||||||
async def _async_get_video(self) -> bool:
|
async def _async_get_video(self) -> bool:
|
||||||
stream = {0: "Main", 1: "Extra"}
|
|
||||||
return await self._api.async_is_video_enabled(
|
return await self._api.async_is_video_enabled(
|
||||||
channel=0, stream=stream[self._resolution]
|
channel=0, stream=RESOLUTION_TO_STREAM[self._resolution]
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _async_set_video(self, enable: bool) -> None:
|
async def _async_set_video(self, enable: bool) -> None:
|
||||||
await self._api.async_set_video_enabled(enable, channel=0)
|
await self._api.async_set_video_enabled(
|
||||||
|
enable, channel=0, stream=RESOLUTION_TO_STREAM[self._resolution]
|
||||||
|
)
|
||||||
|
|
||||||
async def _async_enable_video(self, enable: bool) -> None:
|
async def _async_enable_video(self, enable: bool) -> None:
|
||||||
"""Enable or disable camera video stream."""
|
"""Enable or disable camera video stream."""
|
||||||
@ -585,10 +587,14 @@ class AmcrestCam(Camera):
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def _async_get_audio(self) -> bool:
|
async def _async_get_audio(self) -> bool:
|
||||||
return await self._api.async_audio_enabled
|
return await self._api.async_is_audio_enabled(
|
||||||
|
channel=0, stream=RESOLUTION_TO_STREAM[self._resolution]
|
||||||
|
)
|
||||||
|
|
||||||
async def _async_set_audio(self, enable: bool) -> None:
|
async def _async_set_audio(self, enable: bool) -> None:
|
||||||
await self._api.async_set_audio_enabled(enable)
|
await self._api.async_set_audio_enabled(
|
||||||
|
enable, channel=0, stream=RESOLUTION_TO_STREAM[self._resolution]
|
||||||
|
)
|
||||||
|
|
||||||
async def _async_enable_audio(self, enable: bool) -> None:
|
async def _async_enable_audio(self, enable: bool) -> None:
|
||||||
"""Enable or disable audio stream."""
|
"""Enable or disable audio stream."""
|
||||||
|
@ -13,3 +13,6 @@ SNAPSHOT_TIMEOUT = 20
|
|||||||
|
|
||||||
SERVICE_EVENT = "event"
|
SERVICE_EVENT = "event"
|
||||||
SERVICE_UPDATE = "update"
|
SERVICE_UPDATE = "update"
|
||||||
|
|
||||||
|
RESOLUTION_LIST = {"high": 0, "low": 1}
|
||||||
|
RESOLUTION_TO_STREAM = {0: "Main", 1: "Extra"}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "amcrest",
|
"domain": "amcrest",
|
||||||
"name": "Amcrest",
|
"name": "Amcrest",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/amcrest",
|
"documentation": "https://www.home-assistant.io/integrations/amcrest",
|
||||||
"requirements": ["amcrest==1.9.4"],
|
"requirements": ["amcrest==1.9.7"],
|
||||||
"dependencies": ["ffmpeg"],
|
"dependencies": ["ffmpeg"],
|
||||||
"codeowners": ["@flacjacket"],
|
"codeowners": ["@flacjacket"],
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
|
@ -286,7 +286,7 @@ amberelectric==1.0.3
|
|||||||
ambiclimate==0.2.1
|
ambiclimate==0.2.1
|
||||||
|
|
||||||
# homeassistant.components.amcrest
|
# homeassistant.components.amcrest
|
||||||
amcrest==1.9.4
|
amcrest==1.9.7
|
||||||
|
|
||||||
# homeassistant.components.androidtv
|
# homeassistant.components.androidtv
|
||||||
androidtv[async]==0.0.63
|
androidtv[async]==0.0.63
|
||||||
|
Loading…
x
Reference in New Issue
Block a user