forked from manutoky/haKachelmannWetter
-
Notifications
You must be signed in to change notification settings - Fork 0
Automation Examples
Fischer, Fabian edited this page Apr 28, 2026
·
1 revision
automation:
- alias: "Close shutters before thunderstorm"
trigger:
- platform: state
entity_id: binary_sensor.kachelmannwetter_thunderstorm_expected
to: "on"
action:
- service: cover.close_cover
target:
area_id: wohnzimmer
- service: notify.mobile_app
data:
title: "⛈️ Gewitter erwartet"
message: "Rollläden wurden geschlossen."automation:
- alias: "Wind warning"
trigger:
- platform: numeric_state
entity_id: sensor.kachelmannwetter_wind_gust_today
above: 60
action:
- service: notify.mobile_app
data:
title: "💨 Sturmwarnung"
message: >
Windböen bis {{ states('sensor.kachelmannwetter_wind_gust_today') }} km/h erwartet.
Gartenmöbel sichern!automation:
- alias: "Umbrella reminder"
trigger:
- platform: state
entity_id: person.your_name
from: "home"
condition:
- condition: state
entity_id: binary_sensor.kachelmannwetter_rain_expected_3h
state: "on"
action:
- service: notify.mobile_app
data:
title: "🌧️ Regenschirm mitnehmen!"
message: >
Regenwahrscheinlichkeit: {{ states('sensor.kachelmannwetter_precipitation_probability_today') }}%automation:
- alias: "Garden irrigation"
trigger:
- platform: time
at: "06:00:00"
condition:
- condition: state
entity_id: binary_sensor.kachelmannwetter_rain_expected_3h
state: "off"
- condition: numeric_state
entity_id: sensor.kachelmannwetter_precipitation_probability_today
below: 30
action:
- service: switch.turn_on
target:
entity_id: switch.garden_irrigation
- delay: "00:30:00"
- service: switch.turn_off
target:
entity_id: switch.garden_irrigationautomation:
- alias: "Close roof window on rain"
trigger:
- platform: state
entity_id: binary_sensor.kachelmannwetter_rain_expected_3h
to: "on"
condition:
- condition: state
entity_id: cover.dachfenster
state: "open"
action:
- service: cover.close_cover
target:
entity_id: cover.dachfenster
- service: notify.mobile_app
data:
title: "🌧️ Dachfenster geschlossen"
message: "Regen in den nächsten 3 Stunden erwartet."automation:
- alias: "Frost warning tonight"
trigger:
- platform: state
entity_id: binary_sensor.kachelmannwetter_frost_expected_tonight
to: "on"
condition:
- condition: time
after: "16:00:00"
before: "22:00:00"
action:
- service: notify.mobile_app
data:
title: "🥶 Frostwarnung"
message: >
Heute Nacht wird es {{ state_attr('weather.kachelmannwetter', 'forecast')[0].native_templow }}°C kalt.
Pflanzen reinholen!automation:
- alias: "Frost protection heating"
trigger:
- platform: state
entity_id: binary_sensor.kachelmannwetter_frost_expected_tonight
to: "on"
action:
- service: climate.set_preset_mode
target:
entity_id: climate.garage
data:
preset_mode: "frost_protection"automation:
- alias: "PV forecast morning briefing"
trigger:
- platform: time
at: "07:00:00"
action:
- service: notify.mobile_app
data:
title: "☀️ Solar-Prognose"
message: >
Heute: {{ states('sensor.kachelmannwetter_global_radiation_today') }} Wh/m²
({{ states('sensor.kachelmannwetter_sun_hours_today') }}h Sonne, {{ states('sensor.kachelmannwetter_sun_hours_relative_today') }}%)
Morgen: {{ states('sensor.kachelmannwetter_global_radiation_tomorrow') }} Wh/m²
({{ states('sensor.kachelmannwetter_sun_hours_tomorrow') }}h Sonne)automation:
- alias: "Run appliances during solar peak"
trigger:
- platform: time
at: "08:00:00"
condition:
- condition: numeric_state
entity_id: sensor.kachelmannwetter_global_radiation_today
above: 3000
action:
- service: notify.mobile_app
data:
title: "☀️ Sonniger Tag!"
message: >
{{ states('sensor.kachelmannwetter_global_radiation_today') }} Wh/m² erwartet.
Guter Tag für Waschmaschine & Spülmaschine zwischen 11–15 Uhr.automation:
- alias: "EV charge on solar surplus"
trigger:
- platform: time
at: "09:00:00"
condition:
- condition: numeric_state
entity_id: sensor.kachelmannwetter_sun_hours_today
above: 6
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.ev_solar_charging_preferredautomation:
- alias: "Outdoor lights on at civil dusk"
trigger:
- platform: template
value_template: >
{{ now().isoformat()[:19] == states('sensor.kachelmannwetter_civil_dusk')[:19] }}
action:
- service: light.turn_on
target:
area_id: vorgarten
- alias: "Outdoor lights off at civil dawn"
trigger:
- platform: template
value_template: >
{{ now().isoformat()[:19] == states('sensor.kachelmannwetter_civil_dawn')[:19] }}
action:
- service: light.turn_off
target:
area_id: vorgartenautomation:
- alias: "Boost indoor lights on cloudy days"
trigger:
- platform: numeric_state
entity_id: sensor.kachelmannwetter_cloud_coverage_low
above: 80
condition:
- condition: state
entity_id: binary_sensor.kachelmannwetter_daytime
state: "on"
action:
- service: light.turn_on
target:
area_id: wohnzimmer
data:
brightness_pct: 80automation:
- alias: "Full moon tonight"
trigger:
- platform: numeric_state
entity_id: sensor.kachelmannwetter_moon_illumination
above: 95
condition:
- condition: numeric_state
entity_id: sensor.kachelmannwetter_cloud_coverage_high
below: 30
action:
- service: notify.mobile_app
data:
title: "🌕 Vollmond bei klarem Himmel"
message: >
Mondbeleuchtung: {{ states('sensor.kachelmannwetter_moon_illumination') }}%
Bewölkung: {{ states('sensor.kachelmannwetter_cloud_coverage_high') }}%
Perfekt für Astrofotografie!automation:
- alias: "API rate limit warning"
trigger:
- platform: numeric_state
entity_id: sensor.kachelmannwetter_api_requests_remaining
below: 50
action:
- service: notify.mobile_app
data:
title: "⚠️ KachelmannWetter API"
message: >
Nur noch {{ states('sensor.kachelmannwetter_api_requests_remaining') }} API-Requests übrig.
Eventuell Update-Intervall erhöhen.automation:
- alias: "Morning weather briefing"
trigger:
- platform: time
at: "07:30:00"
action:
- service: notify.mobile_app
data:
title: "🌤️ Wetter heute"
message: >
{{ state_attr('weather.kachelmannwetter', 'temperature') }}°C,
{{ states('weather.kachelmannwetter') | replace('partlycloudy', 'teilweise bewölkt') | replace('sunny', 'sonnig') | replace('cloudy', 'bewölkt') | replace('rainy', 'regnerisch') }}.
Max: {{ state_attr('weather.kachelmannwetter', 'forecast')[0].native_temperature }}°C.
{% if is_state('binary_sensor.kachelmannwetter_rain_expected_3h', 'on') %}☔ Regen erwartet. {% endif %}
{% if is_state('binary_sensor.kachelmannwetter_thunderstorm_expected', 'on') %}⛈️ Gewitter möglich! {% endif %}
Sonne: {{ states('sensor.kachelmannwetter_sun_hours_today') }}h