Convert rain absolute mm to mm/h

I’ve tried creating helpers for Utility meter (1h, 15m, resetting, non-resetting, …) tried the derivative, I cannot seem to get any useful data. I have a sensor that reports absolute rainfall in mm and I would like to create a derivative/delta sensor that reports mm/h, hopefully updating faster than once per hour.

How often does your source sensor update?

That is how often the derivative sensor will update (which is the integration you should use for this).

About once every 5 mins once there’s a change:
image

My meters are set as such:

  • hourly: cron pattern: 0 * * * * , peridically_resetting:false, delta_values: false, net_consumption: false
  • 15 mins: cron pattern: 0/15 * * * *, peridically_resetting:false, delta_values: false, net_consumption: false

There were around 3mm of rain from 12 to 01.

The derivative sensor give me negative values, not sure why.

Have you tried a statistics sensor?

sensor:
  - platform: statistics
    name: "Rainfall per hour"
    entity_id: sensor.your_rainfall_total_sensor_here
    state_characteristic: change
    max_age:
      hours: 1
2 Likes

Thank you!
Will try it out and see how it works. It might not survive a restart but for something that stays at zero most of the time it’s not an issue:

Actually, both statistics and utility meter (1h) work. “Periodically resetting” needs to be set to false. IMHO utility meter is slightly better since it does not reset the value after a HA restart.