Skip to content
Snippets Groups Projects
Unverified Commit c1b47b88 authored by Erik Montnemery's avatar Erik Montnemery Committed by GitHub
Browse files

Adjust utility_meter tests which create devices (#98212)

parent 05ac67eb
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,7 @@ async def test_change_device_source(hass: HomeAssistant) -> None:
# Configure source entity 1 (with a linked device)
source_config_entry_1 = MockConfigEntry()
source_config_entry_1.add_to_hass(hass)
source_device_entry_1 = device_registry.async_get_or_create(
config_entry_id=source_config_entry_1.entry_id,
identifiers={("sensor", "identifier_test1")},
......@@ -292,6 +293,7 @@ async def test_change_device_source(hass: HomeAssistant) -> None:
# Configure source entity 2 (with a linked device)
source_config_entry_2 = MockConfigEntry()
source_config_entry_2.add_to_hass(hass)
source_device_entry_2 = device_registry.async_get_or_create(
config_entry_id=source_config_entry_2.entry_id,
identifiers={("sensor", "identifier_test2")},
......
......@@ -1466,6 +1466,7 @@ async def test_device_id(hass: HomeAssistant) -> None:
entity_registry = er.async_get(hass)
source_config_entry = MockConfigEntry()
source_config_entry.add_to_hass(hass)
source_device_entry = device_registry.async_get_or_create(
config_entry_id=source_config_entry.entry_id,
identifiers={("sensor", "identifier_test")},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment