Skip to content

Nicxe/home-assistant-smhialerts

Repository files navigation

SMHI Alerts

Buy me a Coffee GitHub Release GitHub Downloads (all assets, latest release)

Overview

SMHI Alerts brings weather warnings and risk messages from the Swedish Meteorological and Hydrological Institute (SMHI) into Home Assistant.

This repository now contains both:

  • The Home Assistant integration (smhi_alerts)
  • The Lovelace alert card (smhi-alert-card.js)

Installation

Integration with HACS (recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

You can also add the repository manually in HACS as type Integration.

Integration without HACS

  1. Download smhi_alerts.zip from the latest release.
  2. Extract the archive and place the smhi_alerts folder in config/custom_components/.
  3. Restart Home Assistant.

Alert card installation

The alert card is bundled with this integration.

When the integration starts, it automatically:

  • syncs the bundled card to config/www/smhi-alert-card.js
  • syncs required sidecar assets (icons) to config/www/
  • creates or updates a Lovelace module resource at /local/smhi-alert-card.js?v=... for cache-busting

If you have just installed or updated, reload the browser once to ensure the latest card resource is loaded.

Card usage

  1. Open your dashboard.
  2. Select Edit dashboard.
  3. Add a new card.
  4. Choose Custom: SMHI Alert Card.

Manual card type:

  • custom:smhi-alert-card

Manual fallback (if needed)

Normally no manual Lovelace resource setup is required.

If your dashboard does not load the card automatically, add this resource manually:

  • URL: /local/smhi-alert-card.js
  • Type: JavaScript Module

Configuration

To add the integration, use this button:

Add SMHI Alerts to Home Assistant

If needed, add it manually via Settings > Devices & Services > Add Integration.

Warning

It is not recommended to select all districts, as this may generate large sensor attributes and impact recorder/storage performance.

Release assets and versioning

Each GitHub release in this repository publishes:

  • smhi_alerts.zip for integration installation

The bundled alert card and its assets are included inside smhi_alerts.zip.

Migration from the old card repository

If you previously used Nicxe/home-assistant-smhialert-card, see MIGRATION.md.

Usage screenshot

smhi_alert_screenshot

About

SMHI (Swedish Meteorological and Hydrological Institute) Weather Warnings & Alerts

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors