top of page

Smart Garden Watering Reminder with Home Assistant and Buienradar

  • Writer: Andrea Leandri
    Andrea Leandri
  • 4 days ago
  • 4 min read

Updated: 2 days ago

Skill level: Beginner to Intermediate | Time to complete: 45-60 minutes

What you'll build: A Home Assistant automation that sends a push notification at 19:00 only when your garden actually needs water: growing season, warm day, dry for two days, and no rain expected. No unnecessary reminders on rainy weeks or in winter.

The Idea

A basic watering reminder fires every evening from April to September. You ignore most of them because it rained yesterday, or rain is forecast tomorrow, or it just is not that warm. Eventually you turn it off entirely.

This automation is smarter. It only fires when all four of these are true at once:

  • Growing season - April through September

  • Warm day - today's temperature above 18 degrees

  • Dry for at least 2 days - no meaningful rain recently

  • No rain expected soon - less than 40% chance in the next 48 hours

The clever part is that three of these four conditions are computed by template sensors you build once and can reuse in other automations. All weather data comes from Buienradar - no additional integration needed.

Should you have smart garden lights you could even think of turning them to red in the evening to visually remind you that your vegetation is thirsty ;-)

What You'll Need

  • Home Assistant - any recent version (2024.x or later)

  • Buienradar integration - already set up if you followed the BBQ Weather guide on this site

  • HA Companion App - for the push notification to your phone

Step 1: Check Your Buienradar Sensors

Before writing any templates, confirm which sensors Buienradar has created. Go to Developer Tools → States and search for buienradar or sensor.rain. You need these sensors with numeric values:

  • sensor.temperature_0d - today's temperature

  • sensor.rainchance_1d - rain chance tomorrow (%)

  • sensor.rainchance_2d - rain chance day after tomorrow (%)

  • sensor.precipitation_0d - rain amount today (mm)

  • sensor.precipitation_1d - rain amount yesterday (mm)

Sensor naming varies - yours might be prefixed differently, e.g. sensor.buienradar_temperature_0d. The 0d suffix means today, 1d means tomorrow or yesterday for precipitation, 2d means two days from now. Note your exact names before Step 2.

Step 2: Create the Four Template Sensors

Add all four sensors to your configuration.yaml. If you already have a template: section, add the sensor: block inside it. After adding, do a full HA restart (not just YAML reload - template sensors require a full restart to register).

template:
  - sensor:
      # 1. GROWING SEASON - True from April 1 through September 30
      - name: "growing_season"
        unique_id: growing_season
        state: >
          {{ now().month in [4, 5, 6, 7, 8, 9] }}

      # 2. WARM DAY - True when today's temperature is above 18 degrees
      - name: "warm_day"
        unique_id: warm_day
        state: >
          {{ states('sensor.temperature_0d') | float(0) > 18 }}

      # 3. RAIN EXPECTED SOON - True if rain chance tomorrow or day after > 40%
      - name: "rain_expected_soon"
        unique_id: rain_expected_soon
        state: >
          {{
            states('sensor.rainchance_1d') | float(0) > 40
            or
            states('sensor.rainchance_2d') | float(0) > 40
          }}

      # 4. DRY DAYS COUNTER - counts consecutive days with less than 2mm rain
      - name: "dry_days_counter"
        unique_id: dry_days_counter
        unit_of_measurement: "days"
        state: >
          {% set today_rain = states('sensor.precipitation_0d') | float(0) %}
          {% set yesterday_rain = states('sensor.precipitation_1d') | float(0) %}
          {% set dry_today = today_rain < 2 %}
          {% set dry_yesterday = yesterday_rain < 2 %}
          {% if dry_today and dry_yesterday %}
            2
          {% elif dry_today %}
            1
          {% else %}
            0
          {% endif %}

After restart, verify in Developer Tools → States that all four sensors exist: sensor.growing_season, sensor.warm_day, sensor.rain_expected_soon, sensor.dry_days_counter. If any shows unavailable, check the Buienradar sensor names in your template - a typo in an entity ID is the most common issue.

Step 3: Create the Automation

Settings → Automations & Scenes → Create Automation → Edit in YAML:

alias: "Garden watering reminder (smart)"
description: >
  Sends a push notification at 19:00 when the garden likely needs watering:
  growing season, warm day, dry for at least 2 days, no rain expected.

triggers:
  - trigger: time
    at: "19:00:00"

conditions:
  - condition: state
    entity_id: sensor.growing_season
    state: "True"

  - condition: numeric_state
    entity_id: sensor.dry_days_counter
    above: 1

  - condition: state
    entity_id: sensor.rain_expected_soon
    state: "False"

  - condition: state
    entity_id: sensor.warm_day
    state: "True"

actions:
  - action: notify.mobile_app_iphone_XXXXXX   # replace with your device
    data:
      title: "Water the garden?"
      message: >
        It's been warm and dry for a few days and no significant rain is
        expected. Consider watering plants this evening.

mode: single

Always replace the notify.mobile_app_iphone_XXXXXX with your device where the companion app is installed.

Enrich the Notification

Include live sensor values in the message for more context:

message: >
  It has been {{ states('sensor.dry_days_counter') }} dry days
  and today reached {{ states('sensor.temperature_0d') | float | round(1) }}C.
  Rain chance tomorrow: {{ states('sensor.rainchance_1d') | round(0) | int }}%.
  Consider watering this evening.

How It Behaves in Practice

  • Early May, warm week, no rain since Sunday, dry forecast: all four conditions pass - notification fires

  • June, rained this morning, sunny tomorrow: dry_days_counter = 0 - condition fails - no notification

  • August, hot, dry for 3 days, but 60% rain tomorrow: rain_expected_soon = True - condition fails - no notification (let nature do it)

  • November, mild day: growing_season = False - condition fails - no notification

Customising the Thresholds

Growing season: change the month list to extend or shorten the season. Warm day: lower the threshold (15 degrees) for more sensitivity or raise it (22 degrees) for only proper hot days. Rain expected: raise to 60% to only skip watering when rain is very likely. Dry days: change above: 1 to above: 2 to only remind after 3 or more dry days.

Troubleshooting

  • Sensors show unknown or unavailable: Check Buienradar sensor names exactly match the templates. A single typo makes the whole sensor unavailable.

  • Template sensors not appearing after restart: Check YAML indentation carefully - the template: block must be at root level.

  • Automation never fires: Check all four sensor values in Developer Tools. Run the automation manually and use Traces to see which condition blocked it.

  • Automation fires even after rain: Check sensor.precipitation_0d value - Buienradar updates this periodically, not in real time.


Guide written by a Home Assistant enthusiast in Utrecht. Built with Home Assistant, Buienradar, and the memory of forgetting to water plants one too many times.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page