View on GitHub

Smart Irrigation

A Home Assistant integration to optimize irrigation

Entities

Main page: Usage
Previous: Dashboard card
Next: Services

Each zone you configure will be added as a sensor entity to Home Assistant. The sensor will be named as follows: sensor.smart_irrigation_[zone_name]. So if you have a zone called 'lawn' then the sensor would be named sensor.smart_irrigation_lawn.

Each entity will have the following attributes:

Attribute Description
id internal identification
size the total area the irrigation system reaches in m2 or sq ft.
throughput total amount of water that flows through the irrigation system in liters or gallon per minute.
input_method how the precipitation rate is determined: throughput (from size + throughput) or direct (entered directly).
precipitation_rate the directly entered precipitation rate in mm/h or in/h, when input_method is direct.
state disabled, manual, automatic
bucket the water balance, in mm or inch. The attribute keeps the name bucket, as do maximum_bucket and the entity ids ending in _bucket, so automations keep working.
bucket_unit, size_unit, throughput_unit, drainage_rate_unit, current_drainage_unit, maximum_bucket_unit, precipitation_rate_unit, et_value_unit, et_deficiency_unit, eto_unit the unit each figure is shown in, following the unit system of Home Assistant (mm or inch, m2 or sq ft, liter or gallon per minute).
multiplier the zone's crop factor (Kc).
lead_time the lead time of the zone, in seconds.
maximum_duration the maximum duration of a run for the zone, in seconds.
drainage_rate how fast a saturated root zone drains, per hour (see drainage_rate_unit).
current_drainage the water drained at the last calculation.
maximum_bucket the most water the root zone holds above field capacity.
last_updated when weather data was last retrieved for the zone.
last_calculated when the zone was last calculated.
number_of_data_points how many readings the last calculation worked from.
et_value the net precipitation applied to the water balance by the last calculation, in mm or inch: the water need over the interval with the precipitation already subtracted from it. It is positive on a day where more rain fell than water evaporated. Despite its name this is not the evapotranspiration.
et_deficiency what this zone needs, per day, before the interval scaling and before precipitation, in mm or inch. Negative, because it is what the soil lost. It carries the zone's crop factor, so it is ETc = ET0 x Kc and it agrees with the water balance beside it. Unlike the water balance it does not depend on the calculation interval or on water balance resets, so this is the value to compare when trying out configurations.
eto the reference evapotranspiration of the same run, positive, with no crop factor. This is the number the literature and the weather services quote, so it is the one to hold against an external ET0 figure.
unit_of_measurement seconds
device_class duration
icon default: mdi:sprinkler
friendly_name Name of your zone.

Sample screenshot:

If you want to expose these attributes as separate sensors, you can add template sensors using a template like the following example for bucket:

``

(Since the per-zone device was added, you can also just use the dedicated entities below instead of template sensors.)

Per-zone device and entities

Each zone is also grouped as a device in Home Assistant (named after the zone), attached to the single Smart Irrigation hub device. Alongside the duration sensor above, the device exposes dedicated entities, so a zone reads as a set of entities rather than one attribute bag:

Entity Type Description
Duration (sensor.smart_irrigation_[zone]) sensor Calculated watering duration (seconds). This is the original entity: its entity_id, recorded history and attributes are preserved.
Water balance sensor Current soil water balance (mm/inch); negative means deficit. This is the value the last calculation committed.
Live water balance sensor Where the zone stands now: the same calculation run over the readings collected since the last one, without committing anything. Recomputed as the zone's readings arrive, at most every thirty seconds. Its live attribute is false when there is nothing to estimate from yet (just after a calculation), and the value is then the committed water balance; since, as_of and duration say what the estimate covers and the run it implies.
Applied ET sensor The same figure as the et_value attribute: the net precipitation applied to the water balance at the last calculation (the water need over the interval, et0 x interval, with the rain already subtracted). Positive when more rain fell than water evaporated. Despite its name it is not the evapotranspiration; for that see Daily ET deficiency and the eto attribute. Diagnostic, disabled on a new zone.
Daily ET deficiency sensor This zone's daily need, crop factor included, independent of the interval and of rain. The et_deficiency attribute of the duration sensor. Diagnostic, disabled on a new zone.
Current drainage sensor Water drained as runoff at the last calculation. The current_drainage attribute of the duration sensor. Diagnostic, disabled on a new zone.
Last irrigation sensor (timestamp) When the zone was last credited for a run.
Water used sensor (water, total) Cumulative water delivered to the zone (litres).
Multiplier number Editable per-zone crop factor, written to the store and used by the next calculation. Listed under Configuration.
Irrigation needed binary_sensor On when the water balance is in deficit.
Watering now binary_sensor On while the zone's linked valve/switch is open.
Problem binary_sensor On when a valve problem was reported (e.g. it never opened); clears on the next successful run.
Calculate button Recalculate this zone now.
Reset water balance button Set the water balance to 0 ("I just watered, start from zero").
Reset usage button Zero the cumulative water-used counter.
Irrigate now button Run this zone's valve for its calculated duration (only shown with direct valve control). The run credits the water balance, so the delivered water is accounted for and the next calculation irrigates less.
The zone (valve.smart_irrigation_[zone]) valve The zone as a water valve, for dashboards, voice assistants and valve.open_valve / valve.close_valve. Open waters the zone for its calculated duration, like Irrigate now and water_zone: behind a run in progress it takes its turn, and the run credits the water balance. Close stops the zone's watering, and closes its valve when something else had opened it. It shows open or closed as the linked valve does. Available while direct valve control is on and the zone has a linked valve.

Diagnostic, Configuration, disabled. Applied ET, Daily ET deficiency and Current drainage repeat an attribute of the duration sensor that few dashboards show, so they are diagnostic entities and a zone created since 2026.11 has them disabled: enable one in its entity settings when you want it. A zone that already had them keeps them as they were. The Multiplier is a setting and is listed under Configuration, as are the hub's Skip on precipitation and Precipitation threshold. Home Assistant leaves diagnostic and configuration entities out of the dashboards it generates; a dashboard of your own can show them like any other.

The Smart Irrigation hub device also carries global action buttons: calculate all zones, refresh weather, and (with direct valve control) irrigate all zones. It has the master switch, Calculate and water (switch.smart_irrigation_irrigation_enabled): off, nothing is calculated and nothing is watered (see Switching Smart Irrigation off). It also has a switch, Skip on precipitation, and a number, Precipitation threshold, both under Configuration: the rain forecast skip of the Skip on weather page, which you can change from an automation or a dashboard. The number is in mm, or inch with the imperial unit system.

Postponing from a dashboard. The hub device also has two buttons, Postpone watering 24 h and Postpone watering 48 h, a Resume watering button, and a datetime entity, Watering postponed until (datetime.smart_irrigation_postponed_until). The datetime shows the end of the postponement in force, or nothing, and setting it holds the watering back until that moment: a date and time for the end of your holidays, for instance, from a dashboard or an automation. A moment already past lifts the postponement. They all do what the postpone_irrigation and resume_irrigation services do, and what the Postpone buttons of the Info page do.

Program sensors

With the full controller on, each program, the main program included, has one sensor on the hub device: sensor.smart_irrigation_program_<id>, named "Program ". A program that is added gets its sensor, and one that is deleted loses it. The state is one of idle, waiting, running, paused, suspended or disabled. The attributes:

Attribute Description
program_id the id of the program, which is also in the entity id.
main true for the main program.
next_start the next time a schedule starts it, or empty. Always empty for the main program, which follows the start trigger.
last_run when it last started.
suspended_until the end of its suspension, or empty.
adjustment the adjust_program adjustment in force (percent, seconds and until), or empty.
manual while it waits or runs: true when it was asked for by hand rather than by a schedule.
tour, tours while it runs: the round it is on and how many rounds it has (both count from 1; tour is 0 while it waits).
step, steps while it runs: the step it is on and how many steps the round has (step is 0 while it waits).
percent while it runs: how far along it is, 0 to 100.
remaining_seconds while it runs: the time left, paused time excluded.

The attributes from manual down are only there while the program waits or runs.

These entities are additive: nothing was removed. The duration sensor keeps its entity_id, recorded history and attributes, so existing dashboards, automations and templates keep working. A one-time registry migration moves the duration sensor's internal unique_id to a stable per-zone scheme; the entity_id and history carry over.

The per-zone device/entity layout is inspired by JustChr's Smart Irrigation fork (MIT).

Main page: Usage
Previous: Dashboard card
Next: Services