Water and gas consumption manually

My water and gas company does not provide any kind of integration and I cannot put any sensors on the meters either. I want to enter the consumption data manually.
My water company gives me a consumption report every three months with the previous reading, the current one and the difference between the two periods, that is, what I have consumed between the two readings.
My gas company gives me a report every two months with the amount consumed in those two months.
Can someone help me create the sensors so I can use them in the energy tab.

I have tried creating input_numbers and templates with the input_number to generate a sensor but I do not get any results.

Create a helper template sensor and give it device class energy (or similar for water) and the appropriate units. For the template, you can pull the data from an input_number helper (or anything else):

value: {{ states('input_number.gas_reading') }}

Or you can simply have it return the last reading manually if you don’t want an extra entity involved.

value: 12345

The important part is setting device class to energy (or similar for water) in order to have it usable by the energy dashboard. Be aware that this will look weird on the graphs, since you’ll be dumping a large number only every 2 months or so. Single days will have a massive spike, etc.

I have a input_number define in input_number.yaml

consumo_manual_agua:
  name: Consumo Manual Agua
  initial: 0
  min: 0
  max: 1000000
  step: 1
  mode: box
  unit_of_measurement: "m³"

My configuration.yaml:

...
sensor: !include_dir_merge_list sensors/
input_number: !include input_number.yaml

template:
  - sensor:
      - name: "Consumo Agua"
        unit_of_measurement: "m³"
        state: "{{ states('input_number.consumo_manual_agua') }}"
        device_class: water
...

No sensor on energy panel

input_number.consumo_manual_agua		350		initial: 0
Consumo Manual Agua								editable: false
												min: 0
												max: 1000000
												step: 1
												mode: box
												unit_of_measurement: m³
												friendly_name: Consumo Manual Agua
												
												
sensor.consumo_agua						350		unit_of_measurement: m³
Consumo Agua									device_class: energy
												friendly_name: Consumo Agua

Sorry, I should of made it clearer. For the gas sensor, put device_class: gas and for the water sensor device_class: water, those are the proper classes for the energy dashboard for gas / water. You will also want to restart home assistant just to make sure everything is refreshed with the correct types and then try adding them to the energy dashboard.

Just want to point out that whenever you enter the data, that’s when HA will treat it as having been consumed. Without manually modifying the database, there’s no way to manually enter historical data.

Do you have a display on the meters?
Then this can help you.