mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 23:07:09 +00:00
Unset Alexa authorized flag in additional case (#65044)
This commit is contained in:
parent
a768de51c0
commit
3e94d39c64
@ -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()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user