Automatic watering of plants in Home Assistant with sensors and protective conditions

Home Assistant can link humidity sensor, pump relay, leakage and schedule. But the rule “humidity below 40% - turn on the pump” is not yet safe automatic watering. We need data freshness checks, time limits, pauses between cycles, and clear failure behavior.

Start not with automation, but with observation. Water by hand for a few days, watch the graph and record the actual volume. This way you will know the operating range of your particular sensor, substrate and pot.

Minimal scheme

Entity What is it for What to check
soil moisture sensor feedback calibration, installation location, last update time
pump switch or relay water supply load, state after restart, manual shutdown
leak sensor emergency stop physical water test and accessibility
assistant “automatic watering allowed” service mode must be turned off before servicing
magazine or history analysis of the result start, stop, reason and duration of each cycle

Air temperature and light schedule may be additional conditions, but do not replace basic water protection.

Step 1: Test the sensor manually

Install the sensor in the root zone, but not directly at the drip line. Note the value before hand watering and after the water has been distributed over the substrate. Repeat several cycles. Choose the threshold with a margin of normal noise, and not according to someone else’s percentage table.

If an entity becomes unknown or unavailable, the automation should not use the last old number. For MQTT sensors, configure availability; The official Home Assistant section explains MQTT discovery and accessibility topics.

Step 2: Measure the water supply

Run the pump manually for a known time and measure the volume. Repeat three times. If the result is noticeably different, first correct the feeding, tubes, and IVs. Running time without measured flow does not tell how much water the pot received.

Create separate zones for multiple crops. One pump channel is only suitable for plants with comparable pots, substrate and consumption.

Step 3: Separate trigger, conditions and actions

Home Assistant first receives a trigger, then checks conditions and performs actions - this is reflected in the official documentation for triggers and conditions.

The practical logic for a zone looks like this:

  1. humidity remains below the verified threshold for a specified time;
  2. automatic watering is allowed, sensors are available, there are no leaks;
  3. there has been a minimal pause since the last cycle;
  4. the daily water limit has not been exhausted;
  5. the pump is turned on for a maximum of the tested time;
  6. Shutdown and the result are recorded in a log.

The script execution mode must exclude parallel runs. Even so, the software delay does not replace independent protection: after a restart, a communication failure or a stuck relay, the pump must have a safe limitation at the controller or power level.

Step 4. Check emergency scenarios

Look beyond the "Run" button. Run tests:

  • disconnect the humidity sensor and make sure that the pump does not start;
  • wet the leakage sensor and check for immediate shutdown;
  • restart Home Assistant during the test cycle;
  • temporarily lose MQTT connection;
  • click manual block and check all related rules.

If the result cannot be clearly seen in the interface and history, it is too early to leave the system unobserved.

What to show on the dashboard

The first screen contains just the zone, current humidity and update time, pump status, leakage, last watering and reason for blockage. The graph is needed below to analyze the dynamics. Don't force the operator to open five cards to see if water is flowing.

GrowerHub can take over the zone model, history and equipment management, while keeping MQTT and Zigbee2MQTT as an integration layer. Three operational views are shown on the small farm Automation page.

Restrictions

Home Assistant does not check the quality of installation, the tightness of the tubes and the permissible load of the relay. Mains voltage and equipment near water require qualified installation. A new automatic watering system should not be turned on for the first time before leaving: let it go through several cycles under supervision.

Checklist before automatic mode

  • the sensor is calibrated in a real substrate;
  • old data becomes inaccessible;
  • water consumption is measured;
  • there is a limit of one launch, a pause and a daily limit;
  • leakage stops the pump;
  • manual locking works;
  • every start and stop is visible in the history.

This sequence gives fewer spectacular rules, but turns Home Assistant into a controlled system, and not into a timer with a beautiful graph.

If you want to keep the local Home Assistant, connect it to the GrowerHub via a directed local bridge: self-launch path. For the first stand, you can separately look at sensors and Zigbee-sockets - these are examples, not a required set.