From 62d0efcbc0bf69545b03788bdc02c6824b011dc2 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Mon, 4 Nov 2024 19:13:38 +0100 Subject: [PATCH] Fix wrong camera_hardware_version for NVRs --- reolink_aio/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reolink_aio/api.py b/reolink_aio/api.py index e9f22cb..629c5c8 100644 --- a/reolink_aio/api.py +++ b/reolink_aio/api.py @@ -651,10 +651,10 @@ def camera_name(self, channel: int | None) -> str: if channel is None: return self.nvr_name - if channel not in self._channel_names and channel in self._stream_channels and channel != 0: + if not self.is_nvr and channel not in self._channel_names and channel in self._stream_channels and channel != 0: return self.camera_name(0) # Dual lens cameras if channel not in self._channel_names: - if len(self._channels) == 1: + if not self.is_nvr: return self.nvr_name return "Unknown" return self._channel_names[channel] @@ -687,7 +687,7 @@ def camera_online(self, channel: int) -> bool: def camera_model(self, channel: int | None) -> str: if channel is None: return self.model - if channel not in self._channel_models and channel in self._stream_channels and channel != 0: + if not self.is_nvr and channel not in self._channel_models and channel in self._stream_channels and channel != 0: return self.camera_model(0) # Dual lens cameras if channel not in self._channel_models: return "Unknown" @@ -696,7 +696,7 @@ def camera_model(self, channel: int | None) -> str: def camera_hardware_version(self, channel: int | None) -> str: if channel is None: return self.hardware_version - if channel not in self._channel_hw_version and channel in self._stream_channels and channel != 0: + if not self.is_nvr and channel not in self._channel_hw_version and channel in self._stream_channels and channel != 0: return self.camera_hardware_version(0) # Dual lens cameras if channel not in self._channel_hw_version: if not self.is_nvr: