From ca160c2893b21f2e7165fd49392cdd7b001a5dfc Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Tue, 24 Sep 2024 21:30:30 +0200 Subject: [PATCH] Do not support main recording switch on Home Hub --- reolink_aio/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reolink_aio/api.py b/reolink_aio/api.py index ba3e2e2..4a0b5b6 100644 --- a/reolink_aio/api.py +++ b/reolink_aio/api.py @@ -173,6 +173,7 @@ def __init__( ############################################################################## # NVR (host-level) attributes self._is_nvr: bool = False + self._is_hub: bool = False self._nvr_name: str = "" self._nvr_serial: Optional[str] = None self._nvr_uid: Optional[str] = None @@ -1316,7 +1317,7 @@ def construct_capabilities(self, warnings=True) -> None: if self._push_config.get("PushCfg", {}).get("enable") is not None: self._capabilities["Host"].add("push_config") - if self._recording_settings: + if self._recording_settings and not self._is_hub: self._capabilities["Host"].add("recording") if self._email_settings: @@ -2990,6 +2991,7 @@ def map_host_json_response(self, json_data: typings.reolink_json): dev_info = data["value"]["DevInfo"] self._is_nvr = dev_info.get("exactType", "IPC") in ["NVR", "WIFI_NVR", "HOMEHUB"] self._is_nvr = self._is_nvr or dev_info.get("type", "IPC") in ["NVR", "WIFI_NVR", "HOMEHUB"] + self._is_hub = dev_info.get("exactType", "IPC") == "HOMEHUB" or dev_info.get("type", "IPC") == "HOMEHUB" self._nvr_serial = dev_info["serial"] self._nvr_name = dev_info["name"] self._nvr_model = dev_info["model"]