Help needed with template sensor for daily oil usage for utility meter

I’m using an OilFox sensor to measure the amount of oil for heating in my tanks.

The sensor delivers the amount of oil, which is a decreasing number, as

sensor_oilfox.fillLevelQuantity

Surely this can be translated into a sensor that can be used as a utility meter…?

An official oil sensor in the energy dashboard would be great, but maybe it’s possible to just mask it as a gas sensor instead, and then display it in the dashboard?

So, I have a daily decreasing number which I’d like to turn into an increasing sensor for the utility meter - should that be possible?

Yes it is possible. What you probably have to do is to create sensor that will calculate gas usage based on oil consumption. I created sensor that calculate gas usage based on furnace running time. This is my example but maybe it can point you in the right direction.
First I created a sensor that will calculate furnace running time in sensors.yaml file like this

### Buderus running time daily
- platform: history_stats
  name: Buderus On Time Today
  entity_id: binary_sensor.buderus_kessel_betrieb_1_stufe
  state: "on"
  type: time
  start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

In template.yaml I use this code to calculate gas consumption based on running time

### Buderus gas usage calculation
- sensor:
  - name: "Buderus daily gas usage"
    unique_id: furnace_gas
    device_class: gas
    unit_of_measurement: "m³"
    state: "{{ (states('sensor.buderus_on_time_today') | float * 0.0957 * 60) | round(2) }}"
    state_class: total_increasing

The numbers are calculated by observing gas meter and dividing gas consumption with elapsed time.