WTH is wrong with my shelly power entity, why does it not show long term statistics?

WTH History integration doesn’t support long-term stats
More on this here WTH log retention for only 10 days?

The History integration does support long term statistics, for sensors that have a state_class (and so generate LTS).

e.g.

As Tinkerer tried to explain to you in the other topic, it is not the History integration that does not support LTS, it is the integration that is supplying your sensor to Home Assistant. So work out which integration this is and try again.

EDIT: From the other topic you said:

So whatever integration you are using to connect your Shelly device to Home Assistant is the issue. Not the History integration.

The Shelly integration provides proper LTS information for power entities. This likely means that @reinuke integrated it via MQTT incorrectly by omitting state_class in the MQTT discovery.

1 Like

Look fellas… I’m not mad at you for trying to help . I appreciate it.

But it’s not just Shelly. It was AN EXAMPLE

Main point is/was that the whole shebang isn’t intuitive. It should become more intuitive.

So you have more than one integration that does not support or is not configured for LTS correctly.

To have LTS an entity must have a state_class attribute correctly defined. It’s that simple. One attribute.

As an example share your Shelly config.

Might be so…

Anyway… just close or delete this thread… idk

Share your config and we can help you understand what you need to do.

With all respect, you need to understand that this is likely a bug for the integration providing the sensor. If you’re asking for an easy way to add long term statistics to an entity, there’s already a feature request and WTH for that (which means we would close this one and direct you to that).