I’d like to add some sensors to my energy dasboard. But the sensors are not shown to chose.
The sensor is an sensor mounted at my energy meter that provide the total energy consumption to KNX bus.
The sensor is integrated in Homeassistant as follows:
- name: "eHZ_Ausgabe_Wirkenergie_A+_tot._(kWh)" # Name of entity
state_address: "0/0/104" # GA
type: active_energy_kwh # KNX typ 13.013 Wirkarbeit (kWh)
What I found out, that it is necessary to have the right device class and mybe state class.
Device class is - energy. I think this is set automatically from HA because of the integration of the sensor.
But what about the state class. and how to define it.
What should be the right class?
@ddaniel you have set the state_class to total increasing
I will add it to my sensor to and try what happens.
But one question: What is teh output of your sensor? Provides the sensor allways the hole amount of gass usage? example 500 m³ and later then 501 m³?
It provides daily gas usage based on furnace burner running time. I was able to add it to energy dashboard. I also created weekly and monthly sensors for gas usage using utility meter helper.
thanks for our replies, now i think I know how to set the state class.
But what is the right class for my sensor, wich will provide data in the following way:
Example:
5344 kWh
5345 kWh
…
is total the right class?
The sensor should show the provided value and not the “differences”.
Now it worked fine.
I added the state class as total_increasing
But what I don’t understand, why it is only possible to add electrical Energy (kWh) and not the electric power (W).
I think with adding electric power (W) the moving points in the energy dasboard could be more precise.