This custom card is designed for the SMHI Alert integration, allowing you to display weather warnings from the Swedish Meteorological and Hydrological Institute (SMHI) on your Home Assistant dashboards.
Based on https://github.com/Lallassu/smhialert
You can install this card by following one of the guides below:
- Click on the three dots in the top right corner of the HACS overview menu.
- Select Custom repositories.
- Add the repository URL:
https://github.com/Nicxe/home-assistant-smhialert-card
. - Set the type to Dashboard.
- Click the Add button.
- Search for SMHI Alert Card in HACS and click the Download button.
Without HACS
- Download the
smhi-alert-card.js
file from the latest release. - Place the
smhi-alert-card.js
file in yourconfig/www
folder. - Add a reference to
smhi-alert-card.js
in your dashboard. There are two ways to do this:- Using the UI: Go to Settings → Dashboards → More Options → Resources → Add Resource. Set the URL as
/local/smhi-alert-card.js
and set the Resource type toJavaScript Module
. Note: If you do not see the Resources menu, you need to enable Advanced Mode in your User Profile. - Using YAML: Add the following code to the
lovelace
section of your configuration:resources: - url: /local/smhi-alert-card.js type: module
- Using the UI: Go to Settings → Dashboards → More Options → Resources → Add Resource. Set the URL as
The card can be configured using the dashboard UI editor:
- In the dashboard UI, click on the three dots in the top right corner.
- Click Edit Dashboard.
- Click the Plus button to add a new card.
- Find Custom: SMHI Alert Card in the list.
type: custom:smhi-alert-card
entity: sensor.smhi_alert
show_header: true
show_type: true
show_level: true
show_severity: true
show_published: true
show_period: true
show_details: true
title: Vädervarningar