From 3e94d39c648e528276cb60a2fbe5dbd7d2beba1a Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 27 Jan 2022 18:59:58 +0100 Subject: [PATCH] Unset Alexa authorized flag in additional case (#65044) --- homeassistant/components/cloud/alexa_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/cloud/alexa_config.py b/homeassistant/components/cloud/alexa_config.py index 8a845077dc9..56f49307662 100644 --- a/homeassistant/components/cloud/alexa_config.py +++ b/homeassistant/components/cloud/alexa_config.py @@ -192,10 +192,10 @@ class CloudAlexaConfig(alexa_config.AbstractConfig): if self.should_report_state != self.is_reporting_states: if self.should_report_state: - with suppress( - alexa_errors.NoTokenAvailable, alexa_errors.RequireRelink - ): + try: await self.async_enable_proactive_mode() + except (alexa_errors.NoTokenAvailable, alexa_errors.RequireRelink): + await self.set_authorized(False) else: await self.async_disable_proactive_mode()