Skip to content

Nicxe/home-assistant-smhialert-card

Repository files navigation

SMHI Weather Warnings Card

Overview

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

Installation

You can install this card by following one of the guides below:

With HACS (Recommended)

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

  1. Click on the three dots in the top right corner of the HACS overview menu.
  2. Select Custom repositories.
  3. Add the repository URL: https://github.com/Nicxe/home-assistant-smhialert-card.
  4. Set the type to Dashboard.
  5. Click the Add button.
  6. Search for SMHI Alert Card in HACS and click the Download button.
Without HACS
  1. Download the smhi-alert-card.js file from the latest release.
  2. Place the smhi-alert-card.js file in your config/www folder.
  3. Add a reference to smhi-alert-card.js in your dashboard. There are two ways to do this:
    • Using the UI: Go to SettingsDashboardsMore OptionsResourcesAdd Resource. Set the URL as /local/smhi-alert-card.js and set the Resource type to JavaScript 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

Configuration

The card can be configured using the dashboard UI editor:

  1. In the dashboard UI, click on the three dots in the top right corner.
  2. Click Edit Dashboard.
  3. Click the Plus button to add a new card.
  4. Find Custom: SMHI Alert Card in the list.

Card Example in YAML

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

Usage Screenshots

Screenshot

Screenshot