I have created a flow meter and integration sensor using ESPHome and it is giving pretty accurate values of both flow rate (gal/min) and consumption (gal). The setup uses the existing flow meter of water softner and taps into the 3 wires (VCC, GND, DATA). The 3 wires are then connected to ESPHome using a pulse_counter. Code below. Took multiple readings and so far have about 95% accuracy when using 130 pulse per gallon of water. Use this link for reference Using ESPhome to build a water flow rate meter - #5 by DeeBeeKay
Questions and Problems
I have also created multiple Utility Meters to be able to track this in Energy dashboard. However, after having this run for over a week, the Utility Meter entities are not showing up in Water Consumption dashboard and it continues to show “No matching statistics found”. Input Sensor for Utility Meters is “Water Consumption” (for all). I see stats on the Developer → Statistics page and can modify values.
Update: I see that ESPHOME does support adding a state_class attribute, so you could add state_class: "total_increasing", similar as shown here: Sensor Component — ESPHome
What the ESPHOME sensor is missing is the state_class attribute. This attribute is automatically added when creating the sensor using the linked integration.
Didnt work. What could be wrong? I still dont have any stats. Whats the best way to do a clean start… Indont mind wiping historical data for all sensors