From 2a54d4c3a9c2fc6b985006f1aaaa9c97f026bb2d Mon Sep 17 00:00:00 2001 From: Raphael Hehl <7577984+RaHehl@users.noreply.github.com> Date: Tue, 9 Dec 2025 20:18:04 +0100 Subject: [PATCH] Add model_id to NVR device info in UniFi Protect (#158481) Co-authored-by: RaHehl --- homeassistant/components/unifiprotect/entity.py | 3 ++- tests/components/unifiprotect/snapshots/test_init.ambr | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/unifiprotect/entity.py b/homeassistant/components/unifiprotect/entity.py index 908045592973..a4d1d416134e 100644 --- a/homeassistant/components/unifiprotect/entity.py +++ b/homeassistant/components/unifiprotect/entity.py @@ -319,7 +319,8 @@ class ProtectNVREntity(BaseProtectEntity): identifiers={(DOMAIN, self.device.mac)}, manufacturer=DEFAULT_BRAND, name=self.device.display_name, - model=self.device.type, + model=self.device.market_name or self.device.type, + model_id=self.device.type, sw_version=str(self.device.version), configuration_url=self.device.api.base_url, ) diff --git a/tests/components/unifiprotect/snapshots/test_init.ambr b/tests/components/unifiprotect/snapshots/test_init.ambr index 49c113e856c1..e53b25c4ad34 100644 --- a/tests/components/unifiprotect/snapshots/test_init.ambr +++ b/tests/components/unifiprotect/snapshots/test_init.ambr @@ -25,7 +25,7 @@ }), 'manufacturer': 'Ubiquiti', 'model': 'UNVR-PRO', - 'model_id': None, + 'model_id': 'UNVR-PRO', 'name': 'UnifiProtect', 'name_by_user': None, 'primary_config_entry': ,