Integration of analog water meters

Hello,

I have a problem with the integration of analog water meters.

What I want:
I would like to integrate 4 analog water meters for 2x cold and 2x hot water each. The water meters show a steadily increasing amount of consumed water denoted in m³. I will read the water meters semi-monthly or monthly and record them in Home Assistant.

In the Energy dashboard I want to see the the average water consumption per day since the last time it was recorded.

Additionally, in the energy dashboard I would like to see the cost of water used since the laste time it was recorded.

When selecting a different time period in the energy dashboard, it should use the daily average values as a basis.

What I did (per meter):
First, I created a helper of type “input_number” with the following settings:
Minimum value: 0
Maximum value: 99999
Step size: 0.001
Unit of measurement: m³

Then I created another helper of type “Template sensor” with the following settings:
State template: {{ states('input_number.water_meter_1') }}
Unit of measurement: m³
Device class: Water
State class: Total increasing

Lastly, I added the meter to the energy dashboard and set a static price per m³.

Status quo:
After recording new meter readings, the difference since the last recording is displayed as a large item in the particular hour in which I recorded the new value and not over the entire time since the previous recording.

Additionally, I noticed that when viewing the history of the sensor, it does not generate a correct graph when Home Assistant is restarted between both reading intervals. Home Assistant creates a new data point with the previous reading when restarting, although no value was recorded.

Thank you!

1 Like