Hey!,
i have developed a ESP8266 Project that allows to measure some storage volumes based on different sensors:
For Oil you can use a color sensor - based on color the volume will be calculated based on time.
for other types like rain water you can use laser or sound distance sensors.
for other projects like gas you can use any device which triggers (e.g. button, proximity, light, …)
The project transmits the data via MQTT automatically to Homeassistant and creates Hass-specific entities. it also contains a webinterface with live-updates for stand-allone usage.
you can download the project here: GitHub - Phreak87/OilMeter: Measure oil consumption on a ESP8266 with a TCS34725 / APDS9960 Color Sensor on the burner status LED or HC-SR04 distance sensor.
best regards
Phreak87