Skip to content

Commit

Permalink
chore: Deprecate Google Photo's integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Daanoz committed Sep 28, 2024
1 parent 4596ebb commit 7ca34c9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 21 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/cron.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Google Photos Integration for Home Assistant

> [!WARNING]
> This integration will be deprecated on March 31, 2025 due to Google Photo API changes, [read more](https://github.com/Daanoz/ha-google-photos/issues/64).
[![GitHub Release][releases-shield]][releases]
[![GitHub Activity][commits-shield]][commits]
[![License][license-shield]][license]
Expand Down
14 changes: 14 additions & 0 deletions custom_components/google_photos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import issue_registry
from homeassistant.helpers.device_registry import DeviceEntry
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
Expand Down Expand Up @@ -39,6 +40,19 @@ async def async_migrate_entry(_, config_entry: ConfigEntry):

async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Google Photos from a config entry."""

issue_registry.async_create_issue(
hass,
DOMAIN,
issue_id="integration_deprecation",
breaks_in_ha_version="2025.3",
is_fixable=False,
is_persistent=True,
severity=issue_registry.IssueSeverity.WARNING,
learn_more_url="https://github.com/Daanoz/ha-google-photos/issues/64",
translation_key="integration_deprecation",
)

implementation = await async_get_config_entry_implementation(hass, entry)
session = OAuth2Session(hass, entry, implementation)
auth = AsyncConfigEntryAuth(async_get_clientsession(hass), session)
Expand Down
6 changes: 6 additions & 0 deletions custom_components/google_photos/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@
},
"application_credentials": {
"description": "Follow the [instructions]({more_info_url}) for [OAuth consent screen]({oauth_consent_url}) to give Home Assistant access to your Google Photos. You also need to create Application Credentials linked to your account:\n1. Go to [Credentials]({oauth_creds_url}) and click **Create Credentials**.\n1. From the drop-down list select **OAuth client ID**.\n1. Select **Web application** for the Application Type.\n\n"
},
"issues": {
"integration_deprecation": {
"title": "Google Photos integration deprecated on March 31, 2025",
"description": "Due to changes in the Google Photo's API, this (custom) Google Photos integration will be deprecated on March 31, 2025. Starting from HA 2024.10 there is an official Google Photos integration that incorporates the new API."
}
}
}
6 changes: 6 additions & 0 deletions custom_components/google_photos/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@
"title": "Settings"
}
}
},
"issues": {
"integration_deprecation": {
"title": "Google Photos integration deprecated on March 31, 2025",
"description": "Due to changes in the Google Photo's API, this (custom) Google Photos integration will be deprecated on March 31, 2025. Starting from HA 2024.10 there is an official Google Photos integration that incorporates the new API."
}
}
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip>=24.0
colorlog
homeassistant==2024.5.2
homeassistant==2024.8.1
google-api-python-client==2.71.0
pillow

0 comments on commit 7ca34c9

Please sign in to comment.