Hier das Original https://community.simon42.com/t/mueckenvorhersage/92181
Ich fand die Idee irgendwie gut, auch wenn der Mückenindex mehr wie eine Spielerei wirkt wollt ich das Aufgreifen und etwas verändern.
Ich habe hierzu ChatGPT mit ins Boot geholt und habe ihm meine Standortkoordinaten mitgeteilt sowie das er alle stehenden Gewässer in de nähe Berücksichtigen muss und raus kam das:

Und klickt man auf die Kachel sieht es so aus:

Hier der Template Sensor:
{% set t = state_attr('weather.weather_fusion_ai_home', 'temperature') | float(15) %}
{% set h = state_attr('weather.weather_fusion_ai_home', 'humidity') | float(50) %}
{% set w = state_attr('weather.weather_fusion_ai_home', 'wind_speed') | float(0) %}
{% set c = state_attr('weather.weather_fusion_ai_home', 'cloud_coverage') | float(50) %}
{% set r = states('sensor.rainfall_day') | float(0) %}
{% set el = state_attr('sun.sun', 'elevation') | float(0) %}
{# ============================= #}
{# TEMPERATUR #}
{# ============================= #}
{% if t < 8 or t > 38 %}
{% set temp = 0 %}
{% elif t < 15 %}
{% set temp = ((t - 8) / 7 * 45) | round(0) %}
{% elif t < 22 %}
{% set temp = (45 + (t - 15) / 7 * 45) | round(0) %}
{% elif t <= 28 %}
{% set temp = 100 %}
{% elif t <= 34 %}
{% set temp = (100 - (t - 28) / 6 * 55) | round(0) %}
{% else %}
{% set temp = [45 - (t - 34) / 4 * 45, 0] | max | round(0) %}
{% endif %}
{# ============================= #}
{# LUFTFEUCHTIGKEIT #}
{# ============================= #}
{% if h < 35 %}
{% set hum = 0 %}
{% elif h < 40 %}
{% set hum = ((h - 35) / 5 * 20) | round(0) %}
{% elif h < 60 %}
{% set hum = (20 + (h - 40) / 20 * 45) | round(0) %}
{% elif h < 75 %}
{% set hum = (65 + (h - 60) / 15 * 25) | round(0) %}
{% else %}
{% set hum = 100 %}
{% endif %}
{# ============================= #}
{# WIND #}
{# ============================= #}
{% if w < 3 %}
{% set wind = 100 %}
{% elif w < 8 %}
{% set wind = (100 - (w - 3) / 5 * 25) | round(0) %}
{% elif w < 15 %}
{% set wind = (75 - (w - 8) / 7 * 40) | round(0) %}
{% elif w < 25 %}
{% set wind = [35 - (w - 15) / 10 * 30, 0] | max | round(0) %}
{% else %}
{% set wind = 0 %}
{% endif %}
{# ============================= #}
{# TAGESZEIT / SONNENSTAND #}
{# ============================= #}
{% if el > 30 %}
{% set time = 25 %}
{% elif el > 15 %}
{% set time = (25 + (30 - el) / 15 * 15) | round(0) %}
{% elif el > 6 %}
{% set time = (40 + (15 - el) / 9 * 25) | round(0) %}
{% elif el > -6 %}
{% set time = 90 %}
{% else %}
{% set time = 100 %}
{% endif %}
{# ============================= #}
{# BEWÖLKUNG #}
{# ============================= #}
{% if c < 20 %}
{% set cloud = 35 %}
{% elif c < 50 %}
{% set cloud = (35 + (c - 20) / 30 * 25) | round(0) %}
{% elif c < 80 %}
{% set cloud = (60 + (c - 50) / 30 * 25) | round(0) %}
{% else %}
{% set cloud = 90 %}
{% endif %}
{# ============================= #}
{# REGEN #}
{# ============================= #}
{% if r <= 0.2 %}
{% set rain = 5 %}
{% elif r < 2 %}
{% set rain = (5 + (r - 0.2) / 1.8 * 20) | round(0) %}
{% elif r < 5 %}
{% set rain = (25 + (r - 2) / 3 * 30) | round(0) %}
{% elif r < 10 %}
{% set rain = (55 + (r - 5) / 5 * 25) | round(0) %}
{% elif r < 20 %}
{% set rain = (80 + (r - 10) / 10 * 15) | round(0) %}
{% else %}
{% set rain = 100 %}
{% endif %}
{# ============================= #}
{# GEWÄSSER #}
{# ============================= #}
{% set moorteich = 55 %}
{% set muehlchen = 60 %}
{% set brentanosee = 42 %}
{% set kaestnersee = 45 %}
{% set grosser_woog = 45 %}
{% set grube = 25 %}
{% set gewicht_moorteich = 1.00 %}
{% set gewicht_muehlchen = 0.95 %}
{% set gewicht_brentanosee = 0.75 %}
{% set gewicht_kaestnersee = 0.65 %}
{% set gewicht_woog = 0.60 %}
{% set gewicht_grube = 0.25 %}
{% set summe =
moorteich * gewicht_moorteich +
muehlchen * gewicht_muehlchen +
brentanosee * gewicht_brentanosee +
kaestnersee * gewicht_kaestnersee +
grosser_woog * gewicht_woog +
grube * gewicht_grube
%}
{% set gewichte =
gewicht_moorteich +
gewicht_muehlchen +
gewicht_brentanosee +
gewicht_kaestnersee +
gewicht_woog +
gewicht_grube
%}
{% set water = (summe / gewichte) | round(0) %}
{# ============================= #}
{# GESAMTINDEX #}
{# ============================= #}
{% set index =
temp * 0.25 +
hum * 0.20 +
wind * 0.15 +
time * 0.10 +
cloud * 0.05 +
rain * 0.10 +
water * 0.15
%}
{% if index < 0 %}
0
{% elif index > 100 %}
100
{% else %}
{{ index | round(0) }}
{% endif %}
Ich habe hier für das Wetter, bis auf den Regenmesser, weather.weather_fusion_ai_home verwendet, das liegt daran das unser Temperatur- und Feuchtigkeitssensor auf unserer Terrasse andere Werte wie die in unserer Umgebung zeigt, hier istweather.weather_fusion_ai_home etwas genauer.
Und hier die Kachel:
type: custom:mushroom-template-card
entity: sensor.muckenindex_2_0
primary: |
🦟 {{ states('sensor.muckenindex_2_0') }} / 100
secondary: |
{% set i = states('sensor.muckenindex_2_0') | float(0) %} {% if i < 20 %}
Sehr niedrig
{% elif i < 40 %}
Niedrig
{% elif i < 60 %}
Mittel
{% elif i < 80 %}
Hoch
{% else %}
Sehr hoch
{% endif %}
icon: mdi:mosquito
icon_color: |
{% set i = states('sensor.muckenindex_2_0') | float(0) %} {% if i < 20 %}
green
{% elif i < 40 %}
light-green
{% elif i < 60 %}
amber
{% elif i < 80 %}
orange
{% else %}
red
{% endif %}
multiline_secondary: false
layout: horizontal
fill_container: true
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: 🦟 Mückenindex 2.0
initial_style: wide
content:
type: markdown
content: >
{% set t = state_attr('weather.weather_fusion_ai_home', 'temperature')
| float(15) %}
{% set h = state_attr('weather.weather_fusion_ai_home', 'humidity') |
float(50) %}
{% set w = state_attr('weather.weather_fusion_ai_home', 'wind_speed')
| float(0) %}
{% set c = state_attr('weather.weather_fusion_ai_home',
'cloud_coverage') | float(50) %}
{% set r = states('sensor.rainfall_day') | float(0) %}
{% set el = state_attr('sun.sun', 'elevation') | float(0) %}
{# TEMPERATUR #}
{% if t < 8 or t > 38 %}
{% set temp = 0 %}
{% elif t < 15 %}
{% set temp = ((t - 8) / 7 * 45) | round(0) %}
{% elif t < 22 %}
{% set temp = (45 + (t - 15) / 7 * 45) | round(0) %}
{% elif t <= 28 %}
{% set temp = 100 %}
{% elif t <= 34 %}
{% set temp = (100 - (t - 28) / 6 * 55) | round(0) %}
{% else %}
{% set temp = [45 - (t - 34) / 4 * 45, 0] | max | round(0) %}
{% endif %}
{# LUFTFEUCHTIGKEIT #}
{% if h < 35 %}
{% set hum = 0 %}
{% elif h < 40 %}
{% set hum = ((h - 35) / 5 * 20) | round(0) %}
{% elif h < 60 %}
{% set hum = (20 + (h - 40) / 20 * 45) | round(0) %}
{% elif h < 75 %}
{% set hum = (65 + (h - 60) / 15 * 25) | round(0) %}
{% else %}
{% set hum = 100 %}
{% endif %}
{# WIND #}
{% if w < 3 %}
{% set wind = 100 %}
{% elif w < 8 %}
{% set wind = (100 - (w - 3) / 5 * 25) | round(0) %}
{% elif w < 15 %}
{% set wind = (75 - (w - 8) / 7 * 40) | round(0) %}
{% elif w < 25 %}
{% set wind = [35 - (w - 15) / 10 * 30, 0] | max | round(0) %}
{% else %}
{% set wind = 0 %}
{% endif %}
{# TAGESZEIT #}
{% if el > 30 %}
{% set time = 25 %}
{% elif el > 15 %}
{% set time = (25 + (30 - el) / 15 * 15) | round(0) %}
{% elif el > 6 %}
{% set time = (40 + (15 - el) / 9 * 25) | round(0) %}
{% elif el > -6 %}
{% set time = 90 %}
{% else %}
{% set time = 100 %}
{% endif %}
{# BEWÖLKUNG #}
{% if c < 20 %}
{% set cloud = 35 %}
{% elif c < 50 %}
{% set cloud = (35 + (c - 20) / 30 * 25) | round(0) %}
{% elif c < 80 %}
{% set cloud = (60 + (c - 50) / 30 * 25) | round(0) %}
{% else %}
{% set cloud = 90 %}
{% endif %}
{# REGEN #}
{% if r <= 0.2 %}
{% set rain = 5 %}
{% elif r < 2 %}
{% set rain = (5 + (r - 0.2) / 1.8 * 20) | round(0) %}
{% elif r < 5 %}
{% set rain = (25 + (r - 2) / 3 * 30) | round(0) %}
{% elif r < 10 %}
{% set rain = (55 + (r - 5) / 5 * 25) | round(0) %}
{% elif r < 20 %}
{% set rain = (80 + (r - 10) / 10 * 15) | round(0) %}
{% else %}
{% set rain = 100 %}
{% endif %}
{# GEWÄSSER #}
{% set moorteich = 55 %}
{% set muehlchen = 60 %}
{% set brentanosee = 42 %}
{% set kaestnersee = 45 %}
{% set grosser_woog = 45 %}
{% set grube = 25 %}
{% set gewicht_moorteich = 1.00 %}
{% set gewicht_muehlchen = 0.95 %}
{% set gewicht_brentanosee = 0.75 %}
{% set gewicht_kaestnersee = 0.65 %}
{% set gewicht_woog = 0.60 %}
{% set gewicht_grube = 0.25 %}
{% set summe =
moorteich * gewicht_moorteich +
muehlchen * gewicht_muehlchen +
brentanosee * gewicht_brentanosee +
kaestnersee * gewicht_kaestnersee +
grosser_woog * gewicht_woog +
grube * gewicht_grube
%}
{% set gewichte =
gewicht_moorteich +
gewicht_muehlchen +
gewicht_brentanosee +
gewicht_kaestnersee +
gewicht_woog +
gewicht_grube
%}
{% set water = (summe / gewichte) | round(0) %}
{% set index = states('sensor.muckenindex_2_0') | float(0) %}
{% if index < 20 %}
{% set bewertung = '🟢 Sehr niedrig' %}
{% elif index < 40 %}
{% set bewertung = '🟢 Niedrig' %}
{% elif index < 60 %}
{% set bewertung = '🟡 Mittel' %}
{% elif index < 80 %}
{% set bewertung = '🟠 Hoch' %}
{% else %}
{% set bewertung = '🔴 Sehr hoch' %}
{% endif %}
# 🦟 Mückenindex **{{ index | round(0) }} / 100**
**{{ bewertung }}**
---
| Faktor | Aktueller Wert | Mückenwirkung |
|:--|--:|--:|
| 🌡️ Temperatur | **{{ t | round(1) }} °C** | **{{ temp }} %** |
| 💧 Luftfeuchtigkeit | **{{ h | round(0) }} %** | **{{ hum }} %** |
| 💨 Wind | **{{ w | round(1) }} {{
state_attr('weather.weather_fusion_ai_home', 'wind_speed_unit') or ''
}}** | **{{ wind }} %** |
| 🌅 Tageszeit | Sonnenhöhe {{ el | round(1) }}° | **{{ time }} %** |
| ☁️ Bewölkung | **{{ c | round(0) }} %** | **{{ cloud }} %** |
| 🌧️ Regen heute | **{{ r | round(1) }}** | **{{ rain }} %** |
| 🌊 Gewässer | Standortfaktor | **{{ water }} %** |
---
### Gewichtung
🌡️ Temperatur **25 %**
💧 Luftfeuchtigkeit **20 %**
💨 Wind **15 %**
🌅 Tageszeit **10 %**
☁️ Bewölkung **5 %**
🌧️ Regen **10 %**
🌊 Gewässer **15 %**
**Gesamtgewicht: 100 %**
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card {
border-radius: 18px;
padding: 6px 10px;
}
mushroom-shape-icon {
--icon-size: 42px;
}
.primary {
font-size: 15px !important;
font-weight: 600 !important;
}
.secondary {
font-size: 12px !important;
font-weight: 500 !important;
}
grid_options:
columns: 12
rows: 1
Was soll das ganze?
Nun, im besten fall, wenn es Funktioniert, leifert es einen Hinweis wann man Abends die Fenster schließen sollte oder wenn man z.b. im Garten ist, wann man sich mit Autan einreiben
sollte.
Im schlimmsten fall ist es eine Hübsche Desktop Kachel, also auf Deutsch, man sollte das nicht zuernstnehmen 🤭