Add reauth for Netatmo when token or token scope is invalid (#57487)

This commit is contained in:
Tobias Sauerwein 2021-10-26 16:09:10 +02:00 committed by GitHub
parent c9966a3b04
commit 3970a50553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 313 additions and 106 deletions

View file

@ -33,12 +33,6 @@ async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Netatmo camera light platform."""
if "access_camera" not in entry.data["token"]["scope"]:
_LOGGER.info(
"Cameras are currently not supported with this authentication method"
)
return
data_handler = hass.data[DOMAIN][entry.entry_id][DATA_HANDLER]
await data_handler.register_data_class(