Skip to content

Instantly share code, notes, and snippets.

@Wuest3nFuchs
Last active December 26, 2025 00:11
Show Gist options
  • Select an option

  • Save Wuest3nFuchs/faa27476b5184a85470ec92550d0dd46 to your computer and use it in GitHub Desktop.

Select an option

Save Wuest3nFuchs/faa27476b5184a85470ec92550d0dd46 to your computer and use it in GitHub Desktop.
blueprint:
name: "🌦️ Weather forecast notification PRO 2026"
description: >
Sends a daily weather forecast notification for today and optionally tomorrow.
Supports Mobile App notifications and PC notifications via HASS.Agent.
domain: automation
source_url: https://gist.github.com/Wuest3nFuchs/60b75567ba53613716738afcced887c4
input:
weather_entity:
name: 🌍 Weather Source
selector:
entity:
domain: weather
notify_device:
name: 📱 Mobile Devices
default: []
selector:
device:
integration: mobile_app
multiple: true
notify_service_enable:
name: 🖥️ PC / Service Notifications
default: disable
selector:
select:
options:
- label: Disabled – mobile only
value: disable
- label: Enabled – mobile + PC / services
value: enable
notify_service_script:
name: 📜 Notify Dispatcher Script
default: null
selector:
entity:
domain: script
multiple: false
time:
name: ⏰ Notification Time
selector:
time: {}
notification_title:
name: 🏷️ Notification Title
default: Weather Forecast
notify_message:
name: 🧾 Today’s Forecast Details
default: condition
selector:
select:
mode: list
multiple: true
options:
- label: 🌤️ Weather condition
value: condition
- label: 🌡️ Temperature (high / low)
value: temperature
- label: 🌧️ Precipitation
value: precipitation
- label: 💨 Wind
value: wind
tomorrow_message:
name: 📅 Tomorrow’s Forecast
default: tomorrow
selector:
select:
options:
- label: Include tomorrow’s forecast
value: tomorrow
- label: Only today’s forecast
value: noTomorrow
trigger:
- platform: time
at: !input time
condition: []
actions:
# 1️⃣ Forecast abrufen
- service: weather.get_forecasts
target:
entity_id: !input weather_entity
data:
type: daily
response_variable: daily
# 2️⃣ Variablen vorbereiten
- variables:
weather: !input weather_entity
notify_message: !input notify_message
tomorrow_message: !input tomorrow_message
notify_device: !input notify_device
notify_service_enable: !input notify_service_enable
notify_service_script: !input notify_service_script
forecast: "{{ daily[weather].forecast }}"
icon: >-
{% set c = forecast[0].condition %}
{% if c == 'sunny' %}mdi:weather-sunny
{% elif c == 'partlycloudy' %}mdi:weather-partly-cloudy
{% elif c == 'cloudy' %}mdi:weather-cloudy
{% elif c == 'rainy' %}mdi:weather-rainy
{% elif c == 'pouring' %}mdi:weather-pouring
{% elif c == 'snowy' %}mdi:weather-snowy
{% elif c == 'fog' %}mdi:weather-fog
{% elif c == 'windy' %}mdi:weather-windy
{% else %}mdi:weather-cloudy-alert
{% endif %}
# 3️⃣ Notifications
- choose:
# 📱 Mobile App
- conditions:
- condition: template
value_template: "{{ notify_device | length > 0 }}"
sequence:
- repeat:
for_each: "{{ notify_device }}"
sequence:
- service: notify.mobile_app_{{ device_attr(repeat.item, 'name') | slugify }}
data:
title: !input notification_title
notification_icon: "{{ icon }}"
message: >-
🌤️ {{ forecast[0].condition | capitalize }}
🌡️ {{ forecast[0].temperature }} / {{ forecast[0].templow }} {{ state_attr(weather, 'temperature_unit') }}
{% if 'precipitation' in notify_message %}
🌧️ {{ forecast[0].precipitation }} {{ state_attr(weather, 'precipitation_unit') }}
{% endif %}
{% if 'wind' in notify_message %}
💨 {{ forecast[0].wind_speed }} {{ state_attr(weather, 'wind_speed_unit') }}
{% endif %}
{% if tomorrow_message == 'tomorrow' and forecast | length > 1 %}
📅 Tomorrow: {{ forecast[1].condition | capitalize }},
{{ forecast[1].temperature }} / {{ forecast[1].templow }}
{% endif %}
# 🖥️ HASS.Agent / Script
- conditions:
- condition: template
value_template: >
{{ notify_service_enable == 'enable'
and notify_service_script is not none }}
sequence:
- service: script.turn_on
target:
entity_id: "{{ notify_service_script }}"
data:
variables:
title: !input notification_title
icon: "{{ icon }}"
message: >-
🌤️ {{ forecast[0].condition | capitalize }}
🌡️ {{ forecast[0].temperature }} / {{ forecast[0].templow }} {{ state_attr(weather, 'temperature_unit') }}
{% if 'precipitation' in notify_message %}
🌧️ {{ forecast[0].precipitation }} {{ state_attr(weather, 'precipitation_unit') }}
{% endif %}
{% if 'wind' in notify_message %}
💨 {{ forecast[0].wind_speed }} {{ state_attr(weather, 'wind_speed_unit') }}
{% endif %}
{% if tomorrow_message == 'tomorrow' and forecast | length > 1 %}
📅 Tomorrow: {{ forecast[1].condition | capitalize }},
{{ forecast[1].temperature }} / {{ forecast[1].templow }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment