SMHI Weather Warnings & Alerts

Hi everyone!

I just wanted to share an update project that I’ve recently completed! I’ve taken the old integration by @Lallassu for SMHI Weather Warnings (Swedish Meteorological and Hydrological Institute) and updated both the integration and the associated dashboard card.

Both the integration and the card can be installed via HACS as custom repositories

Home Assistant - SMHI Weather Warnings & Alerts With this integration, you can now easily receive SMHI weather warnings and manage them directly in Home Assistant, perfect for triggering different actions or displaying information on your dashboard.

The integration connects to SMHI’s open API to retrieve weather alerts for Sweden, organized by different districts and their messages. You can choose to receive notifications for all districts or select a specific district if you prefer.

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

SMHI Weather Warnings Card I’ve also updated the associated dashboard card, which is specifically designed to display SMHI warnings on your Home Assistant dashboard.

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

I’m looking forward to your comments and feedback! If anyone has questions or ideas for improvements, feel free to reach out!

Happy automating!

3 Likes

Hi, or ahould i say Tjäna!

Tried to install you SMHI Alerts, but somehow it is not found even after restart.
HACS says it is installed…
Did add you sensor snippet in my configuration.yaml and restarted my whole HA but no avail.
Using 2024.10.1…

What things to search for in the logs?

Mvh Minglarn.

Found the cause…

In you example you say to use:

sensor:
  - platform: smhialert
    district: 'all'
    language: 'sv'

But it should be:

sensor:
  - platform: smhi_alerts
    district: 'all'
    language: 'sv'

:smiley:

Btw, nice work!

1 Like

Tjäna @Minglarn

Great to hear that you got it working! Thank you for pointing out the typo. I’ve updated the readme file on GitHub now!

I’m working on making the integration setup in the UI under Devices, it should be available relatively soon :smile:

Hello everyone!

Both the SMHI Weather Warnings & Alerts integration and the SMHI Weather Warnings Card have now been updated to version 1.1, and I want to share the latest news with you!

What’s new in version 1.1?

SMHI Weather Warnings & Alerts Integration:

  • Configuration directly in Home Assistant UI: No more manual editing of configuration.yaml ! Now the integration can be added and configured entirely through the Home Assistant interface. Just go to Settings > Devices & Services, click on “Add Integration” and select “SMHI Alerts” from the list.
  • Simplified installation: Support for installation via Home Assistant UI has been added, but manual YAML configuration is still available for those who prefer it.

SMHI Weather Warnings Card:

  • New UI-based configuration: The card can now be configured directly via Home Assistant’s built-in dashboard UI editor, making it much easier and more user-friendly.
  • Customizable attributes: You can now choose which specific attributes to display on the card, such as warning type, severity, published time, and warning period. This gives you more flexibility to get exactly the information you want on your dashboard.

I hope these updates make your use of SMHI Weather Warnings & Alerts even smoother and more intuitive. Feedback and contributions are always welcome!

Hello everyone!

I’m excited to announce that version 1.2 of the SMHI Weather Warnings & Alerts integration is now available!

What’s New in Release 1.2?

New Features

  • Support for Multiple Instances: You can now add multiple instances of the integration, each configured for a different district. Entities will be named in the format sensor.smhi_alert_<DISTRICT>, making it easier to keep track of alerts for multiple areas.
  • District Names in UI: During configuration, you will now see the district names directly in the UI, so there’s no longer any need to deal with district numbers.
  • Customizable Alerts: You can now choose if you want to see only warnings or both warnings and informational messages. Messages might represent potential risks, like a risk of water shortage, so you can fine-tune what information you want to receive.

Breaking Changes

  • Entity Name Changes: Entity names have been updated to include the district at the end, e.g., sensor.smhi_alert_<DISTRICT>. If you’re using automation or dashboards that reference these entities, you’ll need to update them accordingly.
  • Messages Disabled by Default: Messages are now turned off by default. If you want to enable messages, simply go to the entity configuration and select the “Show Messages” option.

I hope these updates make the integration even more useful for you all! As always, I appreciate your feedback, suggestions, and contributions.

Feel free to update and let me know how it’s working for you, or if you run into any issues. Your input is incredibly valuable to making this integration even better!