Danish waste-collection dates from Home Assistant → Google Calendar, automatically.
If you run the excellent affalddk integration in Home Assistant, you already have sensors with the next collection date per waste type. This script mirrors those dates into Google Calendar as silent, zero-length events (00:01–00:02, no reminders, muted color) — so collection days are visible on the whole family's calendars without nagging anyone.
- One calendar event per waste type (rest/mad, papir/plast, metal/glas, pap, farligt affald, storskrald — configurable)
- Idempotent: events are tagged, and each run deletes + recreates its own events, so dates that move are corrected automatically
- No cloud middleman: talks directly to your HA instance and the Google Calendar API
pip install requests- Copy
config.example.json→config.jsonand fill in:- your HA URL + a long-lived access token
- your
affalddksensor ids - a Google OAuth credentials file (client id/secret + refresh token with Calendar scope)
- Test:
python3 affald_sync.py - Schedule daily via cron / Task Scheduler.
MIT