Fix errors when trying to enable Alexa (#64536)

* Fix errors when trying to enable Alexa

* Update homeassistant/components/cloud/alexa_config.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Ran black

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Erik Montnemery 2022-01-20 15:26:58 +01:00 committed by GitHub
parent e59510f0ce
commit 8c1a5f5329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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