Skip to content

Commit

Permalink
Do not support main recording switch on Home Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Sep 24, 2024
1 parent 0463aa2 commit ca160c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit ca160c2

Please sign in to comment.