Hi,
I built a simple irrigation controller. I have a solar panel connected to a charge controller and a 12V battery. From the load part of the charge controller I reduced the voltage to 5V and that powers my Wemos S2 mini board with 2 relays controlling 2 solenoid valves.
That is all working great. I can manually switch on water in valve 1 and/or 2.
The device goes to sleep at night. The battery is big enough to keep the device running for a couple of days and it will only get better in the summer with longer days.
Now in Home Assistant I created a template driven sensor that looks at the weather forecast and if there was no rain in the last 24h the sensor has value ON otherwise it is OFF.
In ESPHome I read the sensor value using this yaml code:
- platform: homeassistant
id: zone1_irrigation
name: Zone 1 Irrigation
entity_id: sensor.zone1_irrigation
What I don’t know how do I now tell esphome that if sensor.zone1_irrigation is On to turn on Relay1?
Thanks