My simple, yet powerfull irrigation solution with Home Assistant, Zigbee valve and moisture sensor

Spring is here, so of course I had to do some tidying up and tending to my lawn.

After mowing, scarifying, aerating, reseeding where holes had appeared and fertilising, the only thing left to do was to keep the lawn well watered.

The grass I sowed was Wimbledon. The optimum moisture content is between 50% and 60%. How can I maintain this moisture level during the crucial two weeks after sowing the new grass and during subsequent maintenance of the lawn?

Of course, this can be done by eye or by manually checking the moisture content of the grass. However, it turned out to be a rather ineffective method as I watered for about an hour by eye, whereas the actual moisture reading showed that the grass only needed 15-20 minutes of watering to raise the moisture level.

So this year I took a more technical approach. Firstly, the lawn has been enriched with a moisture meter and, incidentally, a temperature meter. It is a Zigbee meter powered by two AA batteries. It is, of course, waterproof. The exact model:

14.76€ 77% de réduction|Tuya – testeur de sol intelligent Zigbee, mesure de la température et de l’humidité, hygromètre étanche, détecteur d’irrigation d’automatisation de jardin | AliExpress
Achetez malin, vivez mieux! Aliexpress.com

The second component in terms of hardware is the Zigbee valve, just like the previous meter, it is also battery powered, here you need 4 AA batteries and it is also a Zigbee device:

15.12€ 76% de réduction|Tuya Zigbee Système d’arrosage goutte à goutte intelligent, minuterie d’arrosage intelligente, enregistreur de débit d’eau intégré, contrôleur d’eau | AliExpress
Achetez malin, vivez mieux! Aliexpress.com

Pairing with Zigbee2MQTT went without a hitch, although it is important to note that pairing the valve can end successfully, but with an error regarding the actuator. Pressing the manual open button also ends with a strange snapping sound, as if something is jammed inside, while all the errors and strange behaviour are due to the fact that the valve only works when flooded with water.

Both units provide a great deal of information. In addition, the valve on the Z2M itself can be set to operate in any way, whether it be the number of cycles or the amount of water poured over it, or set to 0 and then operated manually on an off principle.

Example of cards with info from devices
Zigbee2MQTT panel for valve.

After connecting everything to the Home Assistant and checking that the valve was working and could be controlled, I started looking for some ready-made integrations in HACS or native to control a simple sprinkler and .... . I couldn't find anything that suited my scenario.

The rest of the article and the actual automation is below pictures fo automation and chart how well it holds moisture level. It took me a while to conquer all the triggers and conditions, so if you want to use it - please subscribe. Thank you very much.