Skip to content

Repository files navigation

maintained hacs_badge ha_version version stability CI hassfest HACS maintainer License

Svensk Postutdelning / Swedish Mail Delivery

A small integration to provide information about delivery days for Postnord and Citymail in any swedish postal code as defined by Postnord and Citymail. The integration will create a sensor for each postal code, and also separate sensors for Postnord and/or Citymail as specified. The common sensor will show the next delivery date regardless of operator.

Installation

HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Go to "Integrations"
  3. Click the "+" button
  4. Search for "Svensk Postutdelning"
  5. Install the integration
  6. Restart Home Assistant

Manual Installation

  1. Download the latest release from GitHub
  2. Extract the custom_components/swemail folder to your Home Assistant's custom_components directory
  3. Restart Home Assistant

Configuration

Via UI (Recommended)

  1. Go to SettingsDevices & Services
  2. Click Add Integration
  3. Search for "Svensk Postutdelning"
  4. Follow the configuration steps.

Localization

I have tried to use machine translation to create a few useable translations. Please correct me if there are any major wrongs or you are missing some languages:

  • 🇬🇧 English (en.json) - English
  • 🇸🇪 Swedish (sv.json) - Svenska
  • 🇮🇸 Icelandic (is.json) - Íslenska
  • 🇩🇰 Danish (da.json) - Dansk
  • 🇳🇴 Norwegian (no.json) - Norsk
  • 🇫🇮 Finnish (fi.json) - Suomi
  • 🇪🇸 Spanish (es.json) - Español
  • 🇹🇷 Turkish (tr.json) - Türkçe
  • 🇸🇦 Arabic (ar.json) - العربية
  • 🇺🇦 Ukrainian (uk.json) - Українська
  • 🇫🇷 French (fr.json) - Français

Entities

For each configured postal code a device is created with:

  • Days until delivery sensor(s) – number of days until the next delivery (per provider, plus a combined sensor when several providers are enabled).
  • Delivery today / tomorrow binary sensors – on when mail is delivered that day. Great for automations.
  • Delivery calendar – upcoming delivery days as all-day calendar events (works with Home Assistant calendar triggers).
  • Optional (opt-in via the integration options): a next delivery date sensor and a postal city sensor per provider.

Attributes on the days sensors include next_delivery, upcoming_delivery, postal_city and last_update.

Automations

Blueprints (one-click import)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled. Notify when mail is delivered today

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled. Reminder the evening before a delivery day

Device triggers

When creating an automation, pick the "Mail Delivery" device and choose a trigger such as "Mail is delivered today" or "Mail is delivered tomorrow" — no templates required.

Events

The integration fires the following events you can trigger on:

  • swemail_delivery_today – fired when the next delivery becomes today. Data: postal_code, provider, next_delivery.
  • swemail_next_delivery_changed – fired when the next delivery date changes. Data: postal_code, provider, next_delivery, previous.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

See CHANGELOG.md for version history.

About

Swedish Post Delivery integration for Home Assistant

Topics

Resources

Contributing

Security policy

Stars

49 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages