Skip to content

altmenorg/HAsmartirrigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1,213 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

hacs_badge release

Smart Irrigation

Smart Irrigation

Smart Irrigation was created by Jeroen ter Heerdt; all credit for the original integration and its evapotranspiration model goes to him. It is now actively maintained here, with the rough edges of the configuration UI and plumbing smoothed out.

This integration calculates the time to run your irrigation system to compensate for moisture loss by evapotranspiration. Using this integration you water your garden, lawn or crops precisely enough to compensate what has evaporated. It takes into account precipitation (rain, snow) and moisture loss caused by evapotranspiration and adjusts accordingly. If it rains or snows less than the amount of moisture lost, then irrigation is required. Otherwise, no irrigation is required. The integration can take into account weather forecasts for the coming days and also keeps track of the total moisture lost or added ('bucket'). Multiple zones are supported, each zone having its own configuration and set up.

โœจ Highlights

  • ๐ŸŽ›๏ธ A modern, Home-Assistant-native configuration UI. The whole config experience was rebuilt with native HA components: instant-save on edit (no more lost focus or jump-to-the-top), native inputs, steppers and pickers, and a clean, responsive layout. Zones, sensor groups, modules, weather service and backup/restore โ€” all from one panel.
  • ๐ŸŒ 19 languages, out of the box. The panel and the config flow are fully translated: English, French, German, Spanish, Italian, Dutch, Norwegian, Slovak, Polish, Portuguese, Brazilian Portuguese, Czech, Russian, Ukrainian, Simplified Chinese, Swedish, Danish, Finnish and Hungarian.
  • ๐ŸŒฆ๏ธ Switch weather service on the fly โ€” move between OpenWeatherMap and Pirate Weather, and update the API key, without removing and re-adding the integration.
  • ๐Ÿ’พ One-click Backup / Restore of your entire configuration as a JSON file.
  • โฐ Flexible start triggers around sunrise, sunset or solar azimuth โ€” each firing its own identifiable event for your automations.
  • ๐Ÿ› ๏ธ Actively maintained โ€” steady fixes, refinements and new features.

Smart Irrigation โ€” Zones panel (Home Assistant-native UI)
The HA-native configuration panel โ€” instant-save editing, native controls, everything in one place.

Sensor groups configuration Backup / restore

Installation

Via HACS (recommended). Smart Irrigation is distributed as a HACS custom repository:

  1. In HACS, open the โ‹ฎ menu โ†’ Custom repositories.
  2. Add https://github.com/altmenorg/HAsmartirrigation with category Integration, and confirm.
  3. Search for Smart Irrigation in HACS and click Download.
  4. Restart Home Assistant, then add it from Settings โ†’ Devices & Services โ†’ Add Integration โ†’ Smart Irrigation.

Manually. Download the latest release and extract it into custom_components/smart_irrigation/, then restart Home Assistant.

Full documentation: altmenorg.github.io/HAsmartirrigation.

Recent improvements

  • A modernized, HA-native configuration UI throughout โ€” instant-save editing (no lost focus, no jump-to-the-top), native inputs and controls, and a consolidated panel for every setting.
  • A fully translated UI in 19 languages (panel and config flow).
  • Switch weather service on the fly โ€” change between OpenWeatherMap and Pirate Weather (and update the API key) from the integration's Configure dialog, without removing and re-adding everything.
  • New Backup / Restore tab: export the whole configuration to a JSON file and restore it.
  • Irrigation start triggers now fire independently and carry their identity in the event data (see below); the trigger form and live add/delete were repaired.
  • Dialogs repaired for Home Assistant 2026.3+ โ€” the Web Awesome ha-dialog migration had hidden every dialog's action buttons.
  • Manual coordinates now save and are actually used for weather data (the config API used to reject them).
  • The weather-service API key is preserved across restarts โ€” imported setups used to lose it.
  • A sensor-sourced field no longer silently falls back to weather-service data when its sensor is unavailable.

Irrigation start triggers

Smart Irrigation computes irrigation durations โ€” your own automation does the actual watering. A start trigger schedules a start relative to a solar event (sunrise, sunset, or solar azimuth, ยฑ an offset) and fires the Home Assistant event smart_irrigation_start_irrigation_all_zones so an automation can react.

Each trigger fires independently, and the event data identifies which one fired:

field meaning
trigger_name the name you gave the trigger
trigger_type sunrise, sunset or solar_azimuth
offset_minutes the configured offset
account_for_duration whether timing is shifted so watering finishes at the target moment

Example automation:

trigger:
  - platform: event
    event_type: smart_irrigation_start_irrigation_all_zones
    event_data:
      trigger_name: "Morning"
action:
  - # open your valves for the durations Smart Irrigation calculated

The precipitation-skip and "days between irrigation" settings still apply: on a skip day no event is fired.

๐Ÿงฉ Enhanced features

These advanced features are driven by services and blueprints โ€” there is no dedicated panel UI for them yet:

  • ๐Ÿ” Recurring schedules โ€” daily / weekly / monthly / interval-based schedules via the smart_irrigation.create_recurring_schedule service.
  • ๐Ÿ‚ Seasonal adjustments โ€” automatically adjust irrigation parameters based on the season.
  • ๐Ÿ”— Irrigation Unlimited integration โ€” bidirectional integration with the Irrigation Unlimited component.
  • ๐Ÿ“ Automation blueprints โ€” ready-to-use blueprints in blueprints/.

See the enhanced scheduling documentation for details and examples.

Documentation

The full documentation is published at altmenorg.github.io/HAsmartirrigation (source in docs/) โ€” installation, configuration (zones, sensor groups, modules), usage, events, services and troubleshooting.

Development

git clone https://github.com/altmenorg/HAsmartirrigation.git
cd HAsmartirrigation
make setup          # create the venv and install dev dependencies

Available commands

make help           # list all commands
make test           # run all tests
make format         # format code (black)
make lint           # run linting (ruff)
make check          # run all CI quality checks

The frontend panel is a separate TypeScript/Lit project under custom_components/smart_irrigation/frontend/ (npm install then npm run build).

Testing

Install the test requirements, then run the suite:

pip install -r requirements.test.txt

pytest                                            # everything
pytest tests/                                     # integration / behavior tests
pytest custom_components/smart_irrigation/tests/  # component unit tests
pytest tests/test_services.py                     # a single file

The project has two test directories:

  • tests/ โ€” integration tests and component behavior tests
  • custom_components/smart_irrigation/tests/ โ€” unit tests for the custom component

Tests use pytest-asyncio, so async test functions must be marked accordingly. A few test files that reference not-yet-implemented modules are parked with a .disabled extension until they are updated.

See CONTRIBUTING.md for the full development and testing guide.

Acknowledgements

Smart Irrigation exists thanks to Jeroen ter Heerdt, who created it, designed its evapotranspiration model and maintained it for years. With this release he is passing the torch, and the project carries on in the same spirit. Thank you, Jeroen, for building something so many gardens rely on, and for entrusting it to good hands. ๐ŸŒฑ

License

MIT โ€” ยฉ 2020 Jeroen ter Heerdt (original Smart Irrigation), ยฉ 2026 Anthony Mercatante.