From 9468aed68970049112d0f2e9cd5c1f13e3ed97bd Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sun, 30 Apr 2023 00:01:44 +0200 Subject: [PATCH] Fix MQTT certificate files setup (#92266) --- homeassistant/components/mqtt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 582608335593f..d3806044fcc52 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -194,6 +194,7 @@ async def _setup_client() -> tuple[MqttData, dict[str, Any]]: conf = dict(entry.data) hass_config = await conf_util.async_hass_config_yaml(hass) mqtt_yaml = PLATFORM_CONFIG_SCHEMA_BASE(hass_config.get(DOMAIN, {})) + await async_create_certificate_temp_files(hass, conf) client = MQTT(hass, entry, conf) if DOMAIN in hass.data: mqtt_data = get_mqtt_data(hass) @@ -206,7 +207,6 @@ async def _setup_client() -> tuple[MqttData, dict[str, Any]]: hass.data[DATA_MQTT] = mqtt_data = MqttData(config=mqtt_yaml, client=client) client.start(mqtt_data) - await async_create_certificate_temp_files(hass, dict(entry.data)) # Restore saved subscriptions if mqtt_data.subscriptions_to_restore: mqtt_data.client.async_restore_tracked_subscriptions(