Once the Wi-Fi watering controller on ESP8266 has been assembled and flashed using ESPHome, the next step is to integrate it with Home Assistant and configure the automation logic. This allows you to create a truly smart watering system that takes into account the schedule, weather conditions, soil moisture level, and even the presence of people on the site.
The first thing to do is to add the device to Home Assistant. After flashing via ESPHome, the device will automatically appear in the integrations section. If this does not happen, you can add it manually by IP address. After connecting to Home Assistant, the user gets access to each GPIO pin that is configured as a relay. Each watering zone can now be turned on and off manually via the Home Assistant interface, as well as used in automations and scripts.
Standard automation is used to organize watering by time. For example, you can set the first zone to turn on every day at 6:00 a.m. for 10 minutes. To do this, create an automation with a time trigger and actions that turn on the desired relay for a specified period. In YAML, it looks simple: turn on the switch, wait 600 seconds, turn off the switch. You can create several such scenarios, depending on the number of watering zones and the desired time intervals.
A more advanced method is to take weather conditions into account. Through integration with OpenWeatherMap or other weather services, Home Assistant can receive data about past and expected rainfall. Based on this data, you can add conditions: do not turn on watering if it has rained in the last 24 hours, or if precipitation is expected to exceed a certain value. This allows you to avoid overwatering and save water. Some users also connect an external rain sensor or soil moisture probe, which determines the need for watering even more accurately.
For advanced automation, you can create a script that turns on watering zones at set intervals. This way, you can water your whole yard with one scenario. In the Home Assistant interface, you can create a button that runs this scenario manually, which is handy if you need to water outside of the schedule.
To increase the reliability of the system, many add notifications. For example, after watering is complete, you can send a message to Telegram or via the Home Assistant mobile app. This allows you to monitor the system even when you are away from home. It is also useful to monitor the connection of the ESP device — if the controller goes offline, Home Assistant can notify the user.
Finally, visualization is an important part of system management. In the Home Assistant interface, you can create a panel with buttons to enable and disable zones, as well as display the current weather, soil moisture graph, and ESP controller connection status. All this makes the system intuitive, convenient, and clear.
Thus, the second part of the ESP8266 Wi-Fi irrigation controller project transforms a simple device with a relay into a full-fledged smart irrigation system. Thanks to flexible logic, weather conditions, automation, and visual control, the user gets a reliable tool that works independently, efficiently, and with minimal intervention.