Skip to content

Commit

Permalink
Add versions to Tile device (#134150)
Browse files Browse the repository at this point in the history
* Add versions to Tile device

* Add versions to Tile device
  • Loading branch information
joostlek authored Dec 28, 2024
1 parent 47adfb5 commit df7d518
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion homeassistant/components/tile/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ def __init__(self, coordinator: TileCoordinator) -> None:
super().__init__(coordinator)
self._tile = coordinator.tile
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self._tile.uuid)}, name=self._tile.name
identifiers={(DOMAIN, self._tile.uuid)},
name=self._tile.name,
manufacturer="Tile Inc.",
hw_version=self._tile.hardware_version,
sw_version=self._tile.firmware_version,
)

@property
Expand Down
2 changes: 2 additions & 0 deletions tests/components/tile/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def tile() -> AsyncMock:
mock.lost_timestamp = datetime(1969, 12, 31, 19, 0, 0)
mock.ring_state = "STOPPED"
mock.voip_state = "OFFLINE"
mock.hardware_version = "02.09"
mock.firmware_version = "01.12.14.0"
mock.as_dict.return_value = {
"accuracy": 13.496111,
"altitude": 0,
Expand Down
6 changes: 3 additions & 3 deletions tests/components/tile/snapshots/test_init.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'hw_version': '02.09',
'id': <ANY>,
'identifiers': set({
tuple(
Expand All @@ -19,15 +19,15 @@
'is_new': False,
'labels': set({
}),
'manufacturer': None,
'manufacturer': 'Tile Inc.',
'model': None,
'model_id': None,
'name': 'Wallet',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'sw_version': None,
'sw_version': '01.12.14.0',
'via_device_id': None,
})
# ---

0 comments on commit df7d518

Please sign in to comment.