Record old consumption values manually or csv import

Hello,

I use this integration to monitor my water consumption:
Utility Meter - Home Assistant

As a sensor I have stored a helper that looks like this:

# Wasserzähler:

      - name: Wasseruhr
        state: "{{ states('input_number.wasseruhr') |float}}"
        unit_of_measurement: "m³"
        state_class: total_increasing
        device_class: water

I enter the current meter reading there every month. That works too.

But now I would like to enter my old meter readings, which I have previously noted in Excel.

Is that possible? I would prefer to do this over an editor.

Another question: Is it possible to modify the input helper mentioned above in such a way that I can choose the input date?
So I could manually enter the meter reading on a specific date.

Many Thanks.

Greeting Werner

Search for historic in the feature request section of the forum and vite for the request for such feature.

Until the feature is (ever ?) implemented … Only thing I know and have sort-of done too is via the db

Hello,

I’m looking for an easy way to enter my gas meter readings manually, stating the reading date.
I read the meter every month and would therefore also give old values ​​- with the date.
At the same time, I would like to provide an initial meter reading.

Can someone help me.

I didn’t reach my goal with “utility_meter”.

Greeting Werner

Have you considered Vaiables+History in HACS? It appears to allow you to save a value in a variable, and previous values as attributes.

I would love a way to manually input readings from my gas meter! I have a very basic analog gas meter that is outside and very hard to read automatically. If I could provide manual updates that could be included in the Home Assistant database that would be amazing!

1 Like

Create an input_number helper to record the reading, then a template something like:

  - sensor:
      - name: "gas_usage"
        state: '{{ states("input_number.gas_reading")| float(0) }}'
        unit_of_measurement: "m³"
        device_class: gas 
        state_class: total_increasing

Edit: Same as the water template from the OP in fact… :flushed:

If you are really a pro then you might be able to make all the right inserts in the database for it to work with the recorder, history and energy dashboard, but it is a daunting task and you would need to keep up on future database changes.
Besides this solution the only way forward is to find the feature requests and vote for them.
Trying to make a sensor with the current means will just put the data onto the database at that point in time and not at the time you might set in an attribute