Unset Alexa authorized flag in additional case (#65044)

This commit is contained in:
Erik Montnemery 2022-01-27 18:59:58 +01:00 committed by Paulus Schoutsen
parent a768de51c0
commit 3e94d39c64

View File

@ -192,10 +192,10 @@ class CloudAlexaConfig(alexa_config.AbstractConfig):
if self.should_report_state != self.is_reporting_states: if self.should_report_state != self.is_reporting_states:
if self.should_report_state: if self.should_report_state:
with suppress( try:
alexa_errors.NoTokenAvailable, alexa_errors.RequireRelink
):
await self.async_enable_proactive_mode() await self.async_enable_proactive_mode()
except (alexa_errors.NoTokenAvailable, alexa_errors.RequireRelink):
await self.set_authorized(False)
else: else:
await self.async_disable_proactive_mode() await self.async_disable_proactive_mode()