feat: Haupt-Automation täglicher Bewässerungs-Check
Scope .gitignore rules for automations/scripts/scenes.yaml to root only so packages/bewaesserung/automations.yaml is tracked correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -4,9 +4,9 @@
|
|||||||
.cache
|
.cache
|
||||||
backups/
|
backups/
|
||||||
secrets.yaml
|
secrets.yaml
|
||||||
automations.yaml
|
/automations.yaml
|
||||||
scripts.yaml
|
/scripts.yaml
|
||||||
scenes.yaml
|
/scenes.yaml
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# packages/bewaesserung/automations.yaml
|
||||||
|
automation:
|
||||||
|
- id: bewaesserung_taeglicher_check
|
||||||
|
alias: "Bewässerung: Täglicher Check"
|
||||||
|
description: >
|
||||||
|
Täglich zur konfigurierten Uhrzeit: gießt wenn Min-Feuchte unter Schwelle
|
||||||
|
und (optional) kein Regen vorhergesagt.
|
||||||
|
mode: single
|
||||||
|
trigger:
|
||||||
|
- platform: time
|
||||||
|
at: input_datetime.bewaesserung_uhrzeit
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.bewaesserung_aktiv
|
||||||
|
state: "on"
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: sensor.bewaesserung_min_feuchte
|
||||||
|
below: input_number.bewaesserung_schwellwert
|
||||||
|
|
||||||
|
action:
|
||||||
|
# Regensperre: nur prüfen wenn aktiv
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.bewaesserung_regensperre
|
||||||
|
state: "on"
|
||||||
|
then:
|
||||||
|
- action: weather.get_forecasts
|
||||||
|
target:
|
||||||
|
entity_id: weather.home
|
||||||
|
data:
|
||||||
|
type: daily
|
||||||
|
response_variable: wetter
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ (wetter['weather.home'].forecast[0].precipitation | float(0)) > 0 }}
|
||||||
|
then:
|
||||||
|
- stop: "Regen vorhergesagt – Bewässerung übersprungen"
|
||||||
|
|
||||||
|
# Pumpe einschalten
|
||||||
|
- action: switch.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: switch.hydro_one
|
||||||
|
|
||||||
|
- action: notify.mobile_app_DEIN_GERAET
|
||||||
|
data:
|
||||||
|
title: "Bewässerung"
|
||||||
|
message: >
|
||||||
|
Bewässerung gestartet – Min-Feuchte: {{ states('sensor.bewaesserung_min_feuchte') }}%
|
||||||
|
|
||||||
|
# Warten bis Zielfeuchte erreicht oder Timeout
|
||||||
|
- wait_for_trigger:
|
||||||
|
- trigger: template
|
||||||
|
value_template: >
|
||||||
|
{{ states('sensor.bewaesserung_min_feuchte') | float(0) >=
|
||||||
|
states('input_number.bewaesserung_ziel_feuchte') | float(70) }}
|
||||||
|
timeout:
|
||||||
|
minutes: "{{ states('input_number.bewaesserung_dauer') | int }}"
|
||||||
|
continue_on_timeout: true
|
||||||
|
|
||||||
|
# Pumpe ausschalten
|
||||||
|
- action: switch.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: switch.hydro_one
|
||||||
|
|
||||||
|
# Benachrichtigung: Ziel erreicht oder Timeout
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ wait.completed }}"
|
||||||
|
then:
|
||||||
|
- action: notify.mobile_app_DEIN_GERAET
|
||||||
|
data:
|
||||||
|
title: "Bewässerung"
|
||||||
|
message: >
|
||||||
|
✅ Fertig – Feuchte jetzt {{ states('sensor.bewaesserung_min_feuchte') }}%
|
||||||
|
else:
|
||||||
|
- action: notify.mobile_app_DEIN_GERAET
|
||||||
|
data:
|
||||||
|
title: "Bewässerung"
|
||||||
|
message: >
|
||||||
|
⚠️ Timeout nach {{ states('input_number.bewaesserung_dauer') | int }} min –
|
||||||
|
Feuchte erst {{ states('sensor.bewaesserung_min_feuchte') }}%
|
||||||
|
|
||||||
|
# Wochenzähler erhöhen
|
||||||
|
- action: counter.increment
|
||||||
|
target:
|
||||||
|
entity_id: counter.bewaesserung_woche
|
||||||
Reference in New Issue
Block a user