Can the Utility meter count every received value, not just a difference?

I have a rain gauge that outputs the measured about of rain in the last minute.
But utility meter will not count two values if the second is the same as the first.

[19:20] Sending state: 0.0mm
[19:21] Sending state: 0.3mm
[19:22] Sending state: 0.3mm
[19:23] Sending state: 0.0mm

The utility meter only counted this as 0.3mm, not 0.6mm as it should be.
Is there a way to change this or a better counter?

This is the utility meter in configuration yaml.


    source: sensor.weather_station_esp32_station_rain
    cycle: daily
    unique_id: rain_total_day
    delta_values: true

    source: sensor.weather_station_esp32_station_rain
    cycle: weekly
    unique_id: rain_total_week
    delta_values: true

    source: sensor.weather_station_esp32_station_rain
    cycle: monthly
    unique_id: rain_total_month
    delta_values: true
    source: sensor.weather_station_esp32_station_rain
    cycle: yearly
    unique_id: rain_total_year
    delta_values: true

No, it has to be a new value for delta_values to work.

Is that the only sensor your rain gauge has?

It’s running ESPHome, so it can be changed.
The rain gauge measures 0.3mm per bucket tip (pulse).

I could add a second numerical sensor but how would that best be done?

A better way would be to count the total in ESPHome so you don’t have to use delta_values in home assistant.

- platform: pulse_counter
    pin: 12 # change to the pin you use
    unit_of_measurement: 'mm/min'
    name: 'Rain Rate per minute'
      - multiply: 0.30  # pulses x 0.3mm for default interval of 60s
      unit_of_measurement: 'mm'
      name: 'Total Rain'
        - multiply: 0.3  # 3.3333 pulses per mm

This assumes you get one pulse each time the bucket tips. Rather than flipping from on to off depending on which side the bucket is tipped.

You can then use the total rain sensor in your utility meters without the delta_values option.

1 Like

Thank you, I’m pleased it’s easy to change.

Does the Utility meter do anything weird if the ESPHome device resets it’s total rain counter? (Such as a power reset).

It shouldn’t.

1 Like

Thankyou @tom_l
First rain since the new year and it has counted this.

(Flat lines on Wind speed/Temp/Humidity is because Home Assistant crashed itself yesterday after the update, thank goodness for backups!)

1 Like