It’s simple blueprint based on: Home Assistant update notification It uses data from meteoalarmeu component by xlcnd and send notifications on mobile device with official Home Assistant app when there is new weather alert.
Get started
Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
Or import this Blueprint by using the forum topic / Gist URL:
Blueprint Code
blueprint:
name: MeteoAlarmEU notification
description: Send a notification when there's new weather aleft form MeteoAlarmEU
domain: automation
input:
alert:
name: MeteoAlarmEU sensor
description: The sensor which indicates if there's an alert
selector:
entity:
domain: binary_sensor
notification_title:
name: Notification title
description: 'Default: "{{ alert_level }} Weather alert!"'
default: "{{ alert_level }} Weather alert!"
include_whole_alert:
name: Include detailed data from alert
description: >
Toggle if you'd like to receive whole alert within the notification, default is true;
When false only alert level and alert type will be send
selector:
boolean:
default: true
custom_message:
name: Send alert with custom message
description: Toggle if you'd like to customize notification, default is false
selector:
boolean:
default: false
notification_message:
name: Custom notification message (optional)
description: 'Create customized message: {{ alert_level }}, {{ alert_type }}, {{ alert_start }}, {{ alert_end }}, {{ alert_content }}'
default: "{{ alert_type }}: {{ alert_start }}-{{ alert_end }}: {{ alert_content }}"
notify_device:
name: Device to notify
description: Choose device that runs official HA app
selector:
device:
integration: mobile_app
trigger:
platform: state
entity_id: !input alert
to: "on"
variables:
alert: !input alert
alert_start: "{{ states[alert].attributes.from }}"
alert_end: "{{ states[alert].attributes.until }}"
alert_type: "{{ states[alert].attributes.awareness_type }}"
alert_level: "{{ states[alert].attributes.awareness_level }}"
alert_content: "{{ states[alert].attributes.message }}"
include_whole_alert: !input include_whole_alert
notification_title: !input notification_title
custom_message: !input custom_message
notification_message: !input notification_message
notify_device: !input notify_device
action:
- device_id: !input notify_device
domain: mobile_app
type: notify
title: "{{ notification_title }}"
message: >
{% if include_whole_alert %}
{% if custom_message %}
{{ notification_message }}
{% else %}
MeteoAlertEU {{ alert_type }}
From {{ alert_start }} To {{ alert_end }} ::
{{ alert_content }}
{% endif %}
{% else %}
MeteoAlertEU {{ alert_level }}: {{ alert_type }}
{% endif %}