mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Add model ID to roborock (#125366)
This commit is contained in:
parent
56b4ddc6b4
commit
006b2da14e
@ -63,6 +63,7 @@ class RoborockDataUpdateCoordinator(DataUpdateCoordinator[DeviceProp]):
|
||||
identifiers={(DOMAIN, self.roborock_device_info.device.duid)},
|
||||
manufacturer="Roborock",
|
||||
model=self.roborock_device_info.product.model,
|
||||
model_id=self.roborock_device_info.product.model,
|
||||
sw_version=self.roborock_device_info.device.fv,
|
||||
)
|
||||
self.current_map: int | None = None
|
||||
|
@ -24,7 +24,7 @@ from homeassistant.components.vacuum import (
|
||||
from homeassistant.const import ATTR_ENTITY_ID, Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from .mock_data import PROP
|
||||
@ -38,12 +38,17 @@ DEVICE_ID = "abc123"
|
||||
async def test_registry_entries(
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
bypass_api_fixture,
|
||||
setup_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Tests devices are registered in the entity registry."""
|
||||
entry = entity_registry.async_get(ENTITY_ID)
|
||||
assert entry.unique_id == DEVICE_ID
|
||||
entity_entry = entity_registry.async_get(ENTITY_ID)
|
||||
assert entity_entry.unique_id == DEVICE_ID
|
||||
|
||||
device_entry = device_registry.async_get(entity_entry.device_id)
|
||||
assert device_entry is not None
|
||||
assert device_entry.model_id == "roborock.vacuum.a27"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Loading…
x
Reference in New Issue
Block a user