Daily Rainfall value not correct

I have a weather station that reports rainfall via MQTT. The station provides a ‘total rainfall’ is continuously increases (unless manually reset which I really don’t want to do).
The relevant MQTT sensor spec is:

    - name: "Rain Total"
      state_topic: "Reading"
      unique_id: "rain_total"
      value_template: '{{ value_json.Outside.Rain.Total }}'
      unit_of_measurement: "mm"
      state_class: total_increasing

This provides a correct reading.
I am using the ‘Utility Meter’ integration to convert this to a ‘daily rainfall’ value:

  daily_rainfall:
    unique_id: "daily_rainfall"
    name: "Daily Rainfall"
    source: sensor.rain_total
    cycle: daily
    delta_values: false

Today we have received 8.4mm of rain and the ‘rain_total’ value went from 5.36 to 13.8.
However the ‘daily rainfall’ value is 0.03.
What am I doing wrong and how can I get the 'right ’ value displayed?
Susan

Can you show the history graph for sensor.rain_total for the last 24 hours?

Capture

How long has the sensor been defined?

I too am playing around for the utility meter for rainfall, but I have a sensor that resets every night at midnight and I want 15 minute data. I am getting unexpected results too so I will watch this topic.

Also 8.4mm today? Are you somewhere in NE Vic? That’s my total today.

Near Lilydale.
I defined the MQTT sensor months ago and the utility integration device 3 days ago (when of course there was no rain so the 0 reading was expected)
Susan

Hmm - ok - I have two sensors, one uses the helper, the other is in configuration.yaml. Both work so that doesn’t help you. My config one uses the cron format for the time:

utility_meter:

  rainfall_5_min:
    source: sensor.rain_accumulation
    cron: 0/5 * * * *
    name: "Rainfall 5 min"
    periodically_resetting: true

Can you post the history graph for your utility meter sensor as well?

I probably should have captured that at the same time as the one above, but here it is from the longer history graph:


Susan

No idea - doesn’t even line up with the first bit of rain does it.

You could try setting periodically_resetting: false and se if that makes any difference.

OK - we had rain last night and it looks like it worked!
The ‘Rain Total’ went from 13.81mm at 18:15 to 16.94mm at 20:05 so 3.13mm:
Rain Total
The ‘Daily Rain’ shows3.14mm happening sat the right time and then dropping back to 0 at midnight:


So - I’m happy (for now!)
Susan

1 Like