Connected Fuel gage


I’m just wondering if anybody has a suggestion on how I could add a fuel guage to a 5 gallon gas can.

I currently use a diesel heater to heat my garage and I love it but I don’t have a way to check the fuel level other then lifting the gas can up and feeling the weight. (Sure that is effective but we all know we love to automate stuff)

I would love to have a way to report the level to my Lovelace dashboard. Any suggestions and parts required would be appreciated.


Probably the safest way is to measure the weight:

1 Like

Thank you this is perfect and seems simple enough.

I appreciate the response!

1 Like

I finally got everything kind of working?

I’m not sure if anybody else has used this or not.

Basically I do receive a reading from the sensors via mqtt.

I used these scripts to get everything into readable numbers.

  • platform: mqtt
    name: "Diesel Weight"
    state_topic: "tele/diesel/SENSOR"
    value_template: "{{ (value_json.HX711.WeightRaw | float - 7766) | round(2) }}"
    unit_of_measurement: 'g'

  - platform: mqtt
    name: "Diesel"
    state_topic: "tele/diesel/SENSOR"
    value_template: "{{ (((value_json.HX711.WeightRaw | float - 7766) | float - 680) | float / 16561 * 100) | round(2)}}"
    unit_of_measurement: '%'

I’m not sure if I did this properly, the 7766 is what I believe the weight of the scale is according to tasmota. The 680 is the amount of grams a 5 gallon empty gas can is. The 16561 grams is 5 gallons of diesel fuel then I multiply by 100 to get a percentage.

The state for the sensor.diesel reads -50.55, this should mean that I’m 1/2 empty ( Or 1/2 full lol)
It seems kind of close in weight from lifting it up. I will know better as I use the gas up as it shouldn’t take long because its cold here in Ohio!!

The readout seems strange with the negative number so I’m not sure if everything is correct or if that’s the way it should look.

I set this up in homekit as a humidity sensor using the integration but that same sensor reads 0% in my app. So I was hoping somebody would know if I’m doing something wrong. admittedly Im very new to MQTT but it seems to be working as it should.

Anybody have any advice? Thanks in advance anybody!

1 Like

Jump to 6:45 in the video. Sound like you need to swap some wires.

I tried that a few times, if they are backwards or if theres a loose connection the calibration falls. When I went to go double check the the connections I noticed one of my solder points came loose. ( I reallly need to get better at that…) But it did seem to fix the issue and now its finally reporting properly in homekit. Thank You so very much for helping!

1 Like