Add Google tasks integration, with initial read-only To-do list (#102629)
* Add Google Tasks integration * Update tests and unique id * Revert devcontainer change * Increase test coverage * Apply suggestions from code review Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Remove ternary * Fix JSON --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
fb13d9ce7c
commit
0cb0e3ceeb
21 changed files with 750 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
"""Application credentials platform for the Google Tasks integration."""
|
||||
|
||||
from homeassistant.components.application_credentials import AuthorizationServer
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .const import OAUTH2_AUTHORIZE, OAUTH2_TOKEN
|
||||
|
||||
|
||||
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
|
||||
"""Return authorization server."""
|
||||
return AuthorizationServer(
|
||||
authorize_url=OAUTH2_AUTHORIZE,
|
||||
token_url=OAUTH2_TOKEN,
|
||||
)
|
||||
|
||||
|
||||
async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
|
||||
"""Return description placeholders for the credentials dialog."""
|
||||
return {
|
||||
"oauth_consent_url": "https://console.cloud.google.com/apis/credentials/consent",
|
||||
"more_info_url": "https://www.home-assistant.io/integrations/google_tasks/",
|
||||
"oauth_creds_url": "https://console.cloud.google.com/apis/credentials",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue