Krisinformation is a custom Home Assistant integration that fetches VMA alerts from Sveriges Radio.
This repository now contains both:
- the Home Assistant integration (
krisinformation) - the Lovelace alert card (
krisinformation-alert-card.js)
You can also add https://github.com/Nicxe/krisinformation manually in HACS as type Integration.
- Download
krisinformation.zipfrom the latest release. - Extract the archive and place the
krisinformationfolder inconfig/custom_components/. - Restart Home Assistant.
The alert card is bundled with this integration.
When the integration starts, it automatically:
- syncs the bundled card to
config/www/krisinformation-alert-card.js - creates or updates a Lovelace
moduleresource at/local/krisinformation-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.
- Open your dashboard.
- Select Edit dashboard.
- Add a new card.
- Choose Custom: Krisinformation Alert Card.
Manual card type:
custom:krisinformation-alert-card
Normally no manual Lovelace resource setup is required.
If your dashboard does not load the card automatically, add this resource manually:
- URL:
/local/krisinformation-alert-card.js - Type:
JavaScript Module
To add the integration, use this button:
If needed, add it manually via Settings > Devices & Services > Add Integration.
{% set alert = state_attr('sensor.krisinformation_hela_sverige', 'alerts')[0] %}
{{ alert['event'] }}: {{ alert['description'] }}automation:
- alias: "Krisinformation Alert Notification"
trigger:
- platform: state
entity_id: sensor.krisinformation_hela_sverige
action:
- service: notify.mobile_app_your_phone
data:
title: "{{ state_attr('sensor.krisinformation_hela_sverige', 'alerts')[0]['event'] }}"
message: "{{ state_attr('sensor.krisinformation_hela_sverige', 'alerts')[0]['description'] }}"Each GitHub release in this repository publishes:
krisinformation.zipfor integration installation
The bundled alert card is included inside krisinformation.zip.
If you previously used Nicxe/krisinformation-alert-card, see MIGRATION.md.
Contributions, bug reports, and feedback are welcome. Please open issues or pull requests on GitHub.
