Skip to content

Commit 2a54d4c

Browse files
authored
Add model_id to NVR device info in UniFi Protect (home-assistant#158481)
Co-authored-by: RaHehl <[email protected]>
1 parent 2008972 commit 2a54d4c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

homeassistant/components/unifiprotect/entity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def _async_set_device_info(self) -> None:
319319
identifiers={(DOMAIN, self.device.mac)},
320320
manufacturer=DEFAULT_BRAND,
321321
name=self.device.display_name,
322-
model=self.device.type,
322+
model=self.device.market_name or self.device.type,
323+
model_id=self.device.type,
323324
sw_version=str(self.device.version),
324325
configuration_url=self.device.api.base_url,
325326
)

tests/components/unifiprotect/snapshots/test_init.ambr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}),
2626
'manufacturer': 'Ubiquiti',
2727
'model': 'UNVR-PRO',
28-
'model_id': None,
28+
'model_id': 'UNVR-PRO',
2929
'name': 'UnifiProtect',
3030
'name_by_user': None,
3131
'primary_config_entry': <ANY>,

0 commit comments

Comments
 (0)