GivEnergy / giv_tcp

TCP connection (from inverter) and MQTT implementation
30 stars 41 forks source link

Entity statistics not available #30

Open andrzej-r opened 1 year ago

andrzej-r commented 1 year ago

Entity statistics are needed for long-term data recording in Home Assistant and for processing in a statistics card or for plotting data in an aggregated format (e.g. plots averaged over 5 minute or 1 hour periods).

Only power measurements can be processed this way, all other entities have no statistical data available on them. My guess is, it is this line that enables statistics for power entities (but not for others): HA_Discovery.py:140 tempObj['state_class']="measurement"

Guidelines from HA: https://www.home-assistant.io/more-info/statistics/ https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics