Basic hour meter for a binary sensor, its working but best practice?

I’m tracking well water usage where I don’t have a real flow meter, but I do have reliable current sensing.

My approach:

  1. Binary sensor → well is ON when motor current > 5A
  2. Counter helper starts at 0
  3. Automation runs every 12 seconds
  4. If well is ON, increment counter by 1 (assumes ~5 GPM)

This effectively integrates gallons over time (poor man’s GPM math), gives me a total gallons-used sensor, and works well for tracking filter life.

Is this considered an acceptable / recommended pattern in Home Assistant, or is there a cleaner best-practice approach I should be using for a LIFE METER that i can reset when i change the filter?

Look at using history_stats. I’m not at a place where I can give you an example, but the documentation should get you started.