Daily statistic gas usage

Hi All,

I could use some help in configuring my Hassio setup to record my daily gas usage of my central heating system. I have a Nefit Trendline HRC25 with the Nefit Easy thermostat, which thank to Marconfus talks brilliantly with my hassio setup.
So I have created the sensor which shows my yearly gas usage .

Now I’m looking for a way to count the amount of gas used daily, using the year_total… I’ve tried the statistics sensor, but somehow it doesn’t show what I need:

  - platform: statistics
    entity_id: sensor.gas_verbruik
    name: "Gas verbruik dag"
    max_age:
      minutes: 1440

Could someone point me in the right direction?

THNX

Define a template sensor to break out the yearly total attribute as a sensor:

sensor:
- platform: template
  sensors:
    total_gas_used:
      friendly_name: 'Total Gas Used'
      entity_id:
        - climate.heating
      value_template: "{{ (state_attr('climate.heating', 'year_total') }}"
      unit_of_measurement: "L" # is this actually litres? If not, change it.

Use that in the utility meter with a daily cycle:

utility_meter:
  gas_used:
    source: sensor.total_gas_used
    cycle: daily

@tom_l Thanks a million! I didn’t even know about the utility meter option within Hassio

1 Like