No description
- Python 100%
|
Some checks failed
build-and-test / build (push) Failing after 53s
Reviewed-on: #2 |
||
|---|---|---|
| .forgejo/workflows | ||
| .github/workflows | ||
| custom_components/birthday_calendar | ||
| tests | ||
| .gitignore | ||
| hacs.json | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
| renovate.json | ||
| uv.lock | ||
Birthday Calendar (CardDAV)
A Home Assistant integration that creates a calendar entity from a CardDAV addressbook, extracting birthdays from contact VCards.
Features
- Connects to any standard CardDAV server (SOGo, Nextcloud, iCloud, etc.).
- Extracts
BDAYfields from VCards. - Creates a Calendar entity with all birthdays as all-day events.
- Calculates the next birthday occurrence and current age.
- Configurable look-ahead period (default 30 days).
Installation
HACS
- Open HACS.
- Add Custom Repository:
https://github.com/phbaer/ha-birthday-calendar. - Select "Integration".
- Install.
Manual Installation
- Download the
birthday_calendar.zipfrom the Latest Release. - Unzip it.
- Copy the
custom_components/birthday_calendarfolder to your Home Assistantconfig/custom_components/directory. - Restart Home Assistant.
Configuration
- Go to Settings > Devices & Services.
- Click Add Integration.
- Search for Birthday Calendar.
- Enter the following details:
- Calendar Name: Friendly name for the entity.
- CardDAV URL: Full URL to your addressbook (e.g.,
https://example.com/dav/user/contacts/). - Username: CardDAV username.
- Password: CardDAV password.
- Days to look ahead: Number of days to include in the calendar view/state (default 30).
Development
This project uses uv for dependency management and requires a recent version of Python (3.13.2+).
Prerequisites
uv- Python 3.13.2 or later
- C Compiler (
build-essential,gcc, orclang) - Required for compiling dependencies on Python 3.14.
Setup
uv sync
Testing
Run the full test suite:
uv run pytest
CI/CD
The project includes a Forgejo/GitHub Actions workflow (.github/workflows/ci.yaml) that:
- Sets up Python 3.12 and
uv. - Installs system dependencies (compilers).
- Runs tests.
- Create a HACS-compatible ZIP release artifact (
birthday_calendar.zip) on every push and tag.