Adjust derivative tests which create devices (#98186)

This commit is contained in:
Erik Montnemery 2023-08-10 18:25:28 +02:00 committed by GitHub
parent fe1f617a35
commit 57d0fd7bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -354,6 +354,7 @@ async def test_device_id(hass: HomeAssistant) -> None:
entity_registry = er.async_get(hass) entity_registry = er.async_get(hass)
source_config_entry = MockConfigEntry() source_config_entry = MockConfigEntry()
source_config_entry.add_to_hass(hass)
source_device_entry = device_registry.async_get_or_create( source_device_entry = device_registry.async_get_or_create(
config_entry_id=source_config_entry.entry_id, config_entry_id=source_config_entry.entry_id,
identifiers={("sensor", "identifier_test")}, identifiers={("sensor", "identifier_test")},