Statistics sensor does not work


I can’t get the statistics sensor to work.
HA log tells me

INFO (MainThread) [homeassistant.loader] Loaded sensor.statistics from homeassistant.components.sensor.statistics
INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.statistics
WARNING (MainThread) [homeassistant.components.sensor.statistics] mean requires at least one data point
WARNING (MainThread) [homeassistant.components.sensor.statistics] variance requires at least two data points

I am using it with an Aeotec Smart Switch 6 where a washing machine is connected to (and it has been in use for more than a week now).

Is there a way to further troubleshoot that somehow?


Please post your configuration (see the blue box at the top for how to format it correctly). Without it nobody can tell you why it’s not working.

Well there is not much to share, see the link to the component above. I just replaced the name of the sensor with the real one. There is nothing more to configure there. The name of the sensor is also most likely correct because it is used in a group and that is working fine.

I change the log level. Thus now it’s just a error and no longer a warning. Depending on the entity you are monitoring it can take a huge amount of time till the sensor is populated. The sensor is storing the data in memory and a restart resets

That is how long? Days / weeks?

If there is no state change then it will take forever.

Well that’s kind of obvious :crazy_face: The sensor does not return any statistic data in my case even if the washing machine has been used multiple times per week without HA being restartet.
That’s why I was asking for a way to troubleshoot that.