Hello everyone, I’ve been working on automating my garden sprinkler system using my ESP32 and the DR55B01 module. It’s been a really interesting project, and I’d love to share my experiences and maybe get some tips from others who have done similar things.
So, my setup is pretty straightforward. I have a simple switch connected to the ESP32, which acts like a push button to operate the sprinkler system. One click turns it on, and another turns it off. The challenge I’ve been facing is remembering and displaying the state of the system—whether it’s on or off—after each click. I’ve tried a few different configurations, but I’m still not getting the state to update and show correctly in my home automation interface.
Here’s what my current configuration looks like:
yaml
switch:
- platform: gpio
pin: 19
id: sprinkler
name: “sprinkler”
icon: “mdi:sprinkler”
on_turn_on:- delay: 1000ms
- switch.turn_off: sprinkler
The idea here is that when I press the switch, it turns the sprinkler on for exactly one second before turning it off again. It’s a quick pulse to activate the system. But the issue is, after each click, I want the system to remember whether it’s on or off and display that state accurately. Right now, it doesn’t seem to be holding the state correctly, which is frustrating because I’d love to have a clear visual indicator of the sprinkler’s status.
I’ve tried using different delay times and even looked into using a state machine to keep track of the sprinkler’s status, but nothing seems to be working perfectly. I’m wondering if there’s a better way to configure this or if I need to add some additional components to make it work as intended.
Has anyone else tackled a similar project? I’d love to hear about your experiences and any tips or tricks you’ve picked up along the way. Maybe there’s a more efficient way to handle the state tracking or a different approach to the automation itself.
In the meantime, I’ll keep experimenting with different configurations and see if I can get the state to update and display correctly. It’s a bit of a puzzle, but I’m determined to figure it out!
Cheers,
[Your Name]