From 13a9b83ed35cb28fb00628d8fe8a93ae9b3cf37f Mon Sep 17 00:00:00 2001 From: Erik Montnemery <erik@montnemery.com> Date: Thu, 10 Aug 2023 18:23:55 +0200 Subject: [PATCH] Adjust mqtt tests which create devices (#98202) --- tests/components/mqtt/test_event.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/components/mqtt/test_event.py b/tests/components/mqtt/test_event.py index e78d3bd1d33..abcd6e8f3ee 100644 --- a/tests/components/mqtt/test_event.py +++ b/tests/components/mqtt/test_event.py @@ -48,7 +48,7 @@ from .test_common import ( help_test_update_with_json_attrs_not_dict, ) -from tests.common import async_fire_mqtt_message +from tests.common import MockConfigEntry, async_fire_mqtt_message from tests.typing import MqttMockHAClientGenerator, MqttMockPahoClient DEFAULT_CONFIG = { @@ -503,9 +503,11 @@ async def test_entity_device_info_with_hub( ) -> None: """Test MQTT event device registry integration.""" await mqtt_mock_entry() + other_config_entry = MockConfigEntry() + other_config_entry.add_to_hass(hass) registry = dr.async_get(hass) hub = registry.async_get_or_create( - config_entry_id="123", + config_entry_id=other_config_entry.entry_id, connections=set(), identifiers={("mqtt", "hub-id")}, manufacturer="manufacturer", -- GitLab