From 6a8a97b57cb7f3789aad5bae4976c6bee488fc34 Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen <balloob@gmail.com>
Date: Thu, 2 Jun 2022 16:15:04 -0700
Subject: [PATCH] Only sync when HA is started up as we already sync at startup
 (#72940)

---
 homeassistant/components/cloud/google_config.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/homeassistant/components/cloud/google_config.py b/homeassistant/components/cloud/google_config.py
index a0a68aaf84a..81f00b69b23 100644
--- a/homeassistant/components/cloud/google_config.py
+++ b/homeassistant/components/cloud/google_config.py
@@ -39,7 +39,6 @@ class CloudGoogleConfig(AbstractConfig):
         self._cur_entity_prefs = self._prefs.google_entity_configs
         self._cur_default_expose = self._prefs.google_default_expose
         self._sync_entities_lock = asyncio.Lock()
-        self._sync_on_started = False
 
     @property
     def enabled(self):
@@ -224,7 +223,7 @@ class CloudGoogleConfig(AbstractConfig):
         self._cur_entity_prefs = prefs.google_entity_configs
         self._cur_default_expose = prefs.google_default_expose
 
-        if sync_entities:
+        if sync_entities and self.hass.is_running:
             await self.async_sync_entities_all()
 
     @callback
-- 
GitLab