Add SmartThings device info from device identification (#161688)

This commit is contained in:
Joost Lekkerkerker
2026-01-27 17:02:10 +01:00
committed by GitHub
parent 6fd2d74539
commit bf07a79e3a
2 changed files with 15 additions and 2 deletions

View File

@@ -517,6 +517,19 @@ def create_devices(
ATTR_SERIAL_NUMBER: matter.serial_number,
}
)
if (main_component := device.status.get(MAIN)) is not None and (
device_identification := main_component.get(
Capability.SAMSUNG_CE_DEVICE_IDENTIFICATION
)
) is not None:
new_kwargs = {
ATTR_SERIAL_NUMBER: device_identification[Attribute.SERIAL_NUMBER].value
}
if ATTR_MODEL_ID not in kwargs:
new_kwargs[ATTR_MODEL_ID] = device_identification[
Attribute.MODEL_NAME
].value
kwargs.update(new_kwargs)
if (
device_registry.async_get_device({(DOMAIN, device.device.device_id)})
is None

View File

@@ -613,11 +613,11 @@
}),
'manufacturer': None,
'model': None,
'model_id': None,
'model_id': 'NZ64B5046GK',
'name': 'Induction Hob',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'serial_number': 'B8C878DX900290H',
'sw_version': None,
'via_device_id': None,
})