mirror of
https://github.com/home-assistant/core.git
synced 2026-06-07 07:56:49 +01:00
0ed8d24b54
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
30 lines
814 B
Python
30 lines
814 B
Python
"""Constants for the OneDrive integration."""
|
|
|
|
from collections.abc import Callable
|
|
from typing import Final
|
|
|
|
from homeassistant.util.hass_dict import HassKey
|
|
|
|
DOMAIN: Final = "onedrive"
|
|
CONF_FOLDER_NAME: Final = "folder_name"
|
|
CONF_FOLDER_ID: Final = "folder_id"
|
|
|
|
CONF_DELETE_PERMANENTLY: Final = "delete_permanently"
|
|
|
|
# replace "consumers" with "common", when adding
|
|
# SharePoint or OneDrive for Business support
|
|
OAUTH2_AUTHORIZE: Final = (
|
|
"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize"
|
|
)
|
|
OAUTH2_TOKEN: Final = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token"
|
|
|
|
OAUTH_SCOPES: Final = [
|
|
"Files.ReadWrite.AppFolder",
|
|
"offline_access",
|
|
"openid",
|
|
]
|
|
|
|
DATA_BACKUP_AGENT_LISTENERS: HassKey[list[Callable[[], None]]] = HassKey(
|
|
f"{DOMAIN}.backup_agent_listeners"
|
|
)
|