From c6a260311dacafc022e3e3bdc82d9e764602cf0b Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Fri, 10 Nov 2023 18:55:54 +0000 Subject: [PATCH] fix MaxExtraStream (#286) Thanks! --- custom_components/dahua/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/dahua/client.py b/custom_components/dahua/client.py index 775db22..bd2eefa 100755 --- a/custom_components/dahua/client.py +++ b/custom_components/dahua/client.py @@ -139,7 +139,7 @@ async def get_max_extra_streams(self) -> int: """ get_max_extra_streams returns the max number of sub streams supported by the camera """ try: result = await self.get("/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream") - return int(result.get("table.MaxExtraStreams", "2")) + return int(result.get("table.MaxExtraStream", "2")) except aiohttp.ClientResponseError as e: pass # If we can't fetch, just assume 2 since that's pretty standard