Changing Sensor class possible?

Hello, I have Sensors with “device class: total increasing”, for instance sensor.vicare_heating_gas_consumption_today. But I need the values separate, like in “device class: measurement”. How to accomplish this?

You’re talking about state_class. A device_class is something totally different.

I also assume when you say you want the values separate, you are talking about in history graphs?


and not this

If so, just create a template sensor that duplicates your original sensor without a state_class.

template:
  - sensor:
      - name: "Gas Consumption Today"
        unique_id: gas_consumption_today
        state: "{{ states('sensor.vicare_heating_gas_consumption_today') }}"

Thanks, at least partial solution. With your suggestion I get this:

But what I really want is:
0:30 → 0.0 kwh
2:30 → 2.5 kwh
4:30 → 2.0 kwh
6:30 → 3.5 kwh
… and so on

BR muellthos