Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![maintained](https://img.shields.io/maintenance/yes/2026.svg)
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/SirIndubitable/ha-google-contacts">
[![hacs_badge](https://img.shields.io/badge/hacs-custom-yellow.svg)](https://github.com/custom-components/hacs)
[![ha_version](https://img.shields.io/badge/home%20assistant-2025.1.0%2B-green.svg)](https://www.home-assistant.io)
[![ha_version](https://img.shields.io/badge/home%20assistant-2025.12.0%2B-green.svg)](https://www.home-assistant.io)
![version](https://img.shields.io/badge/version-0.1.0-yellow.svg)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/mit)

Expand Down Expand Up @@ -37,14 +37,14 @@ You can install this card by following one of the guides below:

[![Add the integration to my home assistant .](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=google-contacts)

Google Contacts integreation uses configuration subentries for configuring the sensors.
Google Contacts integration uses configuration subentries for configuring the sensors.
1. Setup the configuration once per user you want contact information from
2. Create one or multiple configuration subentries using the users contacts

### Calendar Subentry
___
The calendar subentry creates a calendar with dates relevant to your contacts (ie. Birthdays and/or Anniversaries)<br/>
This is similar to the builtin google birthdays calendar, but gives a little more flexability in filtering and how it is displayed
This is similar to the builtin google birthdays calendar, but gives a little more flexibility in filtering and how it is displayed

#### Configuration options:
| Option | Description |
Expand Down
2 changes: 1 addition & 1 deletion custom_components/google_contacts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The google-contacts-calendar integration."""
"""The google-contacts integration."""

from __future__ import annotations

Expand Down
6 changes: 3 additions & 3 deletions custom_components/google_contacts/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""API for google-contacts-calendar bound to Home Assistant OAuth."""
"""API for google-contacts bound to Home Assistant OAuth."""

from abc import ABC, abstractmethod
from dataclasses import dataclass
Expand Down Expand Up @@ -435,14 +435,14 @@ def build_response(


class GoogleContactsApi:
"""Provide google-contacts-calendar authentication tied to an OAuth2 based config entry."""
"""Provide google-contacts authentication tied to an OAuth2 based config entry."""

def __init__(
self,
hass: HomeAssistant,
oauth_session: config_entry_oauth2_flow.OAuth2Session,
) -> None:
"""Initialize google-contacts-calendar auth."""
"""Initialize google-contacts auth."""
self._hass = hass
self._oauth_session = oauth_session

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Application credentials platform for the google-contacts-calendar integration."""
"""Application credentials platform for the google-contacts integration."""

from homeassistant.components.application_credentials import AuthorizationServer
from homeassistant.core import HomeAssistant
Expand Down
4 changes: 2 additions & 2 deletions custom_components/google_contacts/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from homeassistant.helpers import config_entry_oauth2_flow
from homeassistant.helpers.entity import async_generate_entity_id

from .const import DOMAIN, OAUTH2_SCOPES
from .const import DOMAIN, LOGGER_NAME, OAUTH2_SCOPES
from .schema import OPTIONS_SCHEMA as CONFIG_SCHEMA

ENTITY_ID_FORMAT = Platform.CALENDAR + ".{}"
Expand All @@ -37,7 +37,7 @@ class OAuth2FlowHandler(
@property
def logger(self) -> logging.Logger:
"""Return logger."""
return logging.getLogger(__name__)
return logging.getLogger(LOGGER_NAME)

@property
def extra_authorize_data(self) -> dict[str, Any]:
Expand Down
4 changes: 3 additions & 1 deletion custom_components/google_contacts/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Constants for the google-contacts-calendar integration."""
"""Constants for the google-contacts integration."""

DOMAIN = "google_contacts"

Expand All @@ -8,3 +8,5 @@
"https://www.googleapis.com/auth/contacts.readonly",
"https://www.googleapis.com/auth/userinfo.profile",
]

LOGGER_NAME = DOMAIN
4 changes: 2 additions & 2 deletions custom_components/google_contacts/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
GoogleContactsApiError,
GroupsResponse,
)
from .const import DOMAIN
from .const import DOMAIN, LOGGER_NAME
from .schema import Options

type GoogleContactsConfigEntry = ConfigEntry[ContactsUpdateCoordinator]

_LOGGER = logging.getLogger(__name__)
_LOGGER = logging.getLogger(LOGGER_NAME)

UPDATE_INTERVAL: Final = timedelta(minutes=30)
TIMEOUT = 10
Expand Down
8 changes: 6 additions & 2 deletions custom_components/google_contacts/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"codeowners": [
"@SirIndubitable"
],
"integration_type": "service",
"config_flow": true,
"dependencies": [
"application_credentials"
],
"documentation": "https://www.home-assistant.io/integrations/google_contacts_calendar",
"documentation": "https://github.com/SirIndubitable/ha-google-contacts",
"iot_class": "cloud_polling",
"loggers": [
"google_contacts"
],
"requirements": [
"google-api-python-client==2.71.0"
],
"version": "0.1.0"
"version": "0.1.2"
}
Loading