From a3e6abd39614903c6d4d008044f4c12d9c752ea8 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis <jbouwh@users.noreply.github.com> Date: Sat, 3 Sep 2022 15:44:50 +0200 Subject: [PATCH] Use hass.config_entries.async_setup in mqtt test (#77750) * Use hass.config_entries.async_setup * The setup is awaited hence waiting is not needed --- tests/components/mqtt/test_device_trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/components/mqtt/test_device_trigger.py b/tests/components/mqtt/test_device_trigger.py index 661075c3cbe..6bec9a9094d 100644 --- a/tests/components/mqtt/test_device_trigger.py +++ b/tests/components/mqtt/test_device_trigger.py @@ -1439,7 +1439,7 @@ async def test_unload_entry(hass, calls, device_reg, mqtt_mock, tmp_path) -> Non new_yaml_config_file = tmp_path / "configuration.yaml" new_yaml_config_file.write_text("") with patch.object(hass_config, "YAML_CONFIG_FILE", new_yaml_config_file): - await mqtt_entry.async_setup(hass) + await hass.config_entries.async_setup(mqtt_entry.entry_id) # Rediscover and fake short press 3 async_fire_mqtt_message(hass, "homeassistant/device_automation/bla1/config", data1) -- GitLab