Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions homeassistant/components/smartthings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,11 @@ def device_info(self) -> DeviceInfo:
return DeviceInfo(
configuration_url="https://account.smartthings.com",
identifiers={(DOMAIN, self._device.device_id)},
manufacturer="Unavailable",
model=self._device.device_type_name,
manufacturer=self._device.status.ocf_manufacturer_name,
model=self._device.status.ocf_model_number,
name=self._device.label,
hw_version=self._device.status.ocf_hardware_version,
sw_version=self._device.status.ocf_firmware_version,
)

@property
Expand Down
6 changes: 6 additions & 0 deletions tests/components/smartthings/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ def _factory(label, capabilities, status: dict = None):
"deviceTypeName": "Switch",
"deviceNetworkType": "ZWAVE",
},
"ocf": {
"manufacturerName": "Generic manufacturer",
"modelNumber": "123",
"hwVersion": "v4.56",
"firmwareVersion": "v7.89",
},
"type": "DTH",
}
device = DeviceEntity(api, data=device_data)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/smartthings/test_binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def test_entity_and_device_attributes(
assert entry.configuration_url == "https://account.smartthings.com"
assert entry.identifiers == {(DOMAIN, device.device_id)}
assert entry.name == device.label
assert entry.model == device.device_type_name
assert entry.model == device.status.ocf_model_number
assert entry.manufacturer == "Unavailable"


Expand Down