ESP Home Integration Platform vs HA Reimann Sum Not Equal

Hey All,

I have a Enpress Pioneer whole home water filter that I took a wemos D1 Mini and am reading the hall effect sensor. I generated a flow curve that is accurate and created an integration sensor in ESP Home. Only issue I had is that the integration sensor data would be lost on restarts which I didn’t want as I am trying to maintain data for over a year.

Code here:

sensor:
  - platform: pulse_counter
    pin: D2
    update_interval: 1s
    unit_of_measurement: "GPM"
    icon: "mdi:water-pump"
    name: "Water Flow Rate"
    id: water_flow_rate
    count_mode:
      rising_edge: Increment
      falling_edge: Disable
    filters:
      - multiply: 0.006 
      - median:
          window_size: 4
          send_every: 3
          send_first_at: 2
    accuracy_decimals: 2

    
  - platform: integration                  #used with pulse counter
    name: "Water Usage Gallons"
    sensor: water_flow_rate
    time_unit: min
    icon: "mdi:water"
    accuracy_decimals: 2
    unit_of_measurement: "Gallons"

This is accurate and trends exactly with my softener flow (mechanical device)

In order to store it long term reliably I decided to use the RSSI helper (wish I did it in configuration but separate story).
Example setup picture:

Here is where the inherent issue lies…
Data for both over the last 24 hours.


One is not like the other. Am I missing something here as to why they are significantly different?

***PLEASE NOTE: I just noticed this the starting point, on the graphs, near the same number is purely coincidental. The ESP integration has been running a few days now. The Riemann Sum was started around 36 hours ago. ***

Any ideas?

Similar issue found. Ended up using restore and min save interval on ESP Home. If I have wear out issues Ill update to an ESP32.