From 18ea43b9272701bd05ae4913b855e2c8d268b7a5 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 26 Jan 2022 10:59:36 +0100 Subject: [PATCH] Prevent race when loading cloud config (#64901) * Prevent race when loading cloud config * Tweak --- homeassistant/components/cloud/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/cloud/client.py b/homeassistant/components/cloud/client.py index e81ad2bc4b1..ad34186b7df 100644 --- a/homeassistant/components/cloud/client.py +++ b/homeassistant/components/cloud/client.py @@ -95,14 +95,15 @@ class CloudClient(Interface): cloud_user = await self._prefs.get_cloud_user() - self._alexa_config = alexa_config.CloudAlexaConfig( + alexa_conf = alexa_config.CloudAlexaConfig( self._hass, self.alexa_user_config, cloud_user, self._prefs, self.cloud, ) - await self._alexa_config.async_initialize() + await alexa_conf.async_initialize() + self._alexa_config = alexa_conf return self._alexa_config