mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Allow camera usage with HA cloud (#56533)
This commit is contained in:
parent
e34c985534
commit
2478ec887a
@ -52,11 +52,6 @@ async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up the Netatmo camera platform."""
|
||||
if "access_camera" not in entry.data["token"]["scope"]:
|
||||
_LOGGER.info(
|
||||
"Cameras are currently not supported with this authentication method"
|
||||
)
|
||||
|
||||
data_handler = hass.data[DOMAIN][entry.entry_id][DATA_HANDLER]
|
||||
|
||||
await data_handler.register_data_class(
|
||||
|
@ -50,6 +50,8 @@ class NetatmoFlowHandler(
|
||||
def extra_authorize_data(self) -> dict:
|
||||
"""Extra data that needs to be appended to the authorize url."""
|
||||
scopes = [
|
||||
"access_camera",
|
||||
"access_presence",
|
||||
"read_camera",
|
||||
"read_homecoach",
|
||||
"read_presence",
|
||||
@ -61,10 +63,6 @@ class NetatmoFlowHandler(
|
||||
"write_thermostat",
|
||||
]
|
||||
|
||||
if self.flow_impl.name != "Home Assistant Cloud":
|
||||
scopes.extend(["access_camera", "access_presence"])
|
||||
scopes.sort()
|
||||
|
||||
return {"scope": " ".join(scopes)}
|
||||
|
||||
async def async_step_user(self, user_input: dict | None = None) -> FlowResult:
|
||||
|
Loading…
x
Reference in New Issue
Block a user