#"Gas Flow rate" in Energy dashboard not accepting "Device class: gas"

1 messages · Page 1 of 1 (latest)

keen vault
#

Just updated to 2026.3.0 because i wanted to set up the new "Now" badges. Power is working but i'm having trouble with the "Gas Flow Rate".

I am using DSMR Smart meter integration, and created:

#gas per hour

  • platform: derivative
    name: Gas per uur
    source: sensor.gas_consumption
    unit_time: h
    time_window: "00:05:00"

This unfortunately doesnt show up when i try to select the entity, so i created another:

template:

  • sensor:
    • name: "Gas flow rate"
      unit_of_measurement: "m³/h"
      device_class: gas
      state_class: measurement
      state: "{{ states('sensor.gas_per_uur') | float(0) }}"

I can select this in the dropdown, but once i have added it i get an error:

Unexpected device class
The following entities do not have the expected device class:

  • sensor.gas_flow_rate (gas)

When i remove the device class, i get again an error:

Unexpected device class
The following entities do not have the expected device class:
sensor.gas_flow_rate

What device class is the sensor supposed to have?

Even with the error the badge is now showing, but unfortunately it shows Gas Flow in L/min.
both derivate and template sensors, and the dsmr consumption sensor are in M3 & m3/h.

I was looking around to see people with the same issue but haven't found any. Did i make a mistake in my configuration, or have i stumbled upon a bug?

gaunt sand
#

Try volume_flow_rate

#

gas isn't right, as that's for totals

#

Though that's certainly not ideal if the error doesn't mention it :\

keen vault
#

Thanks so much for the fast response! Let me check right away.

#

On the dashboard it still shows Gas flow in L/min instead of m3/h. Both sensor.gas_consumption and sensor.gas_flow_rate are reporting in m3/h.
Is there a way to change that ?