Skip to content

Commit

Permalink
Fix MQTT certificate files setup (#92266)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh authored Apr 29, 2023
1 parent bff7119 commit 9468aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand Down

0 comments on commit 9468aed

Please sign in to comment.