From 8723441227f52a8d2aa11cb6391f0ad635576425 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Wed, 5 Jun 2024 03:37:40 +0200 Subject: [PATCH] Add Reolink serial number to device info of IPC camera (#118834) * Add UID to dev info * Add camera_uid to test --- homeassistant/components/reolink/entity.py | 1 + tests/components/reolink/conftest.py | 1 + 2 files changed, 2 insertions(+) diff --git a/homeassistant/components/reolink/entity.py b/homeassistant/components/reolink/entity.py index 53a81f2b162..bf62c9cbeee 100644 --- a/homeassistant/components/reolink/entity.py +++ b/homeassistant/components/reolink/entity.py @@ -132,6 +132,7 @@ class ReolinkChannelCoordinatorEntity(ReolinkHostCoordinatorEntity): model=self._host.api.camera_model(dev_ch), manufacturer=self._host.api.manufacturer, sw_version=self._host.api.camera_sw_version(dev_ch), + serial_number=self._host.api.camera_uid(dev_ch), configuration_url=self._conf_url, ) diff --git a/tests/components/reolink/conftest.py b/tests/components/reolink/conftest.py index ba4e9615e8c..6cf88b9b00d 100644 --- a/tests/components/reolink/conftest.py +++ b/tests/components/reolink/conftest.py @@ -85,6 +85,7 @@ def reolink_connect_class() -> Generator[MagicMock, None, None]: host_mock.camera_model.return_value = TEST_CAM_MODEL host_mock.camera_name.return_value = TEST_NVR_NAME host_mock.camera_sw_version.return_value = "v1.1.0.0.0.0000" + host_mock.camera_uid.return_value = TEST_UID host_mock.session_active = True host_mock.timeout = 60 host_mock.renewtimer.return_value = 600