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”