@Jatho wrote:
Hi there
I’ve modified my Oregon rain gauge and soldered wires to the reed switch which I’ve then connected to VIN pin and D8 pin on a nodemcu board and using ESPhome with the intention of it recording the amount of rainfall over time.
I’ve set it up using the pulse_counter platform however the issue is that the pulse_counter acts like a counter per minute giving you the number of times the switch is toggled in one minute but then resets to zero after a minute and starts counting again for the next minute, what I need is for it count each time the switch is toggled and increase it by that count so that I am then able to measure rain fall by hour, day, month, year etc…
Is there a way to count and store this information in Home Assistant?
I’ve searched the forum and have come across similar scenarios but haven’t really seen any examples of a reed switch being used to count, its either open or closed and doesn’t need to be accumulated.
Thanks in advance.
sensor: - platform: pulse_counter pin: D8 name: "Rain Gauge" icon: "mdi:water" unit_of_measurement: "mm" accuracy_decimals: 2
Posts: 6
Participants: 3