diff --git a/packages/bewaesserung/automations.yaml b/packages/bewaesserung/automations.yaml index e0ad96d..6e8e60b 100644 --- a/packages/bewaesserung/automations.yaml +++ b/packages/bewaesserung/automations.yaml @@ -34,7 +34,7 @@ automation: - if: - condition: template value_template: > - {{ (wetter['weather.home'].forecast[0].precipitation | float(0)) > 0 }} + {{ (wetter['weather.home'].forecast | default([{}]) | first).precipitation | default(0) | float(0) > 0 }} then: - stop: "Regen vorhergesagt – Bewässerung übersprungen" @@ -55,8 +55,7 @@ automation: 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 }}" + timeout: "{{ (states('input_number.bewaesserung_dauer') | int) * 60 }}" continue_on_timeout: true # Pumpe ausschalten