1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Add serial number for Nintendo Switch devices (#155500)

This commit is contained in:
Jordan Harvey
2025-10-30 12:42:51 +00:00
committed by GitHub
parent 1d6c9e3d94
commit edaf5c8167
2 changed files with 5 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ class NintendoDevice(CoordinatorEntity[NintendoUpdateCoordinator]):
sw_version=device.extra["firmwareVersion"]["displayedVersion"],
model=device.model,
model_id=device.generation,
serial_number=device.extra["serialNumber"],
)
async def async_added_to_hass(self) -> None:

View File

@@ -32,7 +32,10 @@ def mock_nintendo_device() -> Device:
mock = AsyncMock(spec=Device)
mock.device_id = "testdevid"
mock.name = "Home Assistant Test"
mock.extra = {"firmwareVersion": {"displayedVersion": "99.99.99"}}
mock.extra = {
"firmwareVersion": {"displayedVersion": "99.99.99"},
"serialNumber": "SN12345678",
}
mock.limit_time = 120
mock.today_playing_time = 110
mock.today_time_remaining = 10