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) }}"
- name: "Gas flow rate"
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?