Gas mqtt sensor (meter) "last_reset" (not working with energy portal)

I have added pressure sensors for water and deisel tanks to read the tank level and volume. I capture the data from the sensors with node red and send the data via mqtt to HA.

In home assistant I get the readings correctly after I configured mqtt sensors in configuration.yaml code below. When adding the sensor to the energy dashboard, I get an error message that I am missing “last_reset”, but it seems that it is not supported for mqtt sensors.

Any suggestions how I can add the water and desiel meters/sensors to the energy dashboard?

´´´ - state_topic: “X420/deisel/volume”
name: “Deisel-volume”
value_template: “{{ value_json.deisel_volume |float|round(4) }}”
unit_of_measurement: “m³”
unique_id: “420deiselm3”
state_class: “measurement”
device_class: “gas”
# last_reset: “None”

:thinking:Should the stat_class note be total_increasing

It is hyrdorstatic pressure sensor for a desiel tank. so it will decrease with use and increase with fill up. to me it is a measurement. I think of energy metters as as total_increasing

Entities not representing a total amount

Home Assistant tracks the min, max and mean value during the statistics period. The state_class property must be set to measurement, and the device_class must not be either of energy, gas, or monetary
Sensor Entity | Home Assistant Developer Docs