diff --git a/src/panels/config/cloud/account/cloud-account.ts b/src/panels/config/cloud/account/cloud-account.ts index 63ea847326..15e5d3c002 100644 --- a/src/panels/config/cloud/account/cloud-account.ts +++ b/src/panels/config/cloud/account/cloud-account.ts @@ -12,6 +12,7 @@ import "../../../../components/buttons/ha-call-api-button"; import "../../../../components/ha-card"; import "../../../../components/ha-button-menu"; import "../../../../components/ha-icon-button"; +import { debounce } from "../../../../common/util/debounce"; import { cloudLogout, CloudStatusLoggedIn, @@ -219,11 +220,15 @@ export class CloudAccount extends SubscribeMixin(LitElement) { } protected override hassSubscribe() { - const googleCheck = () => { - if (!this.cloudStatus?.google_registered) { - fireEvent(this, "ha-refresh-cloud-status"); - } - }; + const googleCheck = debounce( + () => { + if (this.cloudStatus && !this.cloudStatus.google_registered) { + fireEvent(this, "ha-refresh-cloud-status"); + } + }, + 10000, + true + ); return [ this.hass.connection.subscribeEvents(() => { if (!this.cloudStatus?.alexa_registered) {