I have a tasmota device that is setting up a discovery topic as below - note how it does not have a “state_class: measurement” field, and so the entity is not usable as a statistic.
I don’t have control of the discovery setup (it uses blerry). Is there a way that I can “add” the state_class?
Aside: I thought I could try to create a new sensor as follows, but I still cannot see the entity as a statistic.
@parautenbach and @francisp thankyou so much for this tip - after defining the customization as you noted, the entity was immediately available as a statistic in the developer page and also the statistics card, etc.
Your tip was a gem - this config override feature is not obvious to newcomers!
Indeed, it’s not obvious. What I learned myself only last year was that you can actually define any custom attributes (not just the known HA ones, like state class, friendly name, etc.). I mark e.g. some entities with monitor: true for custom battery monitoring with my own templates and automations. It’s a powerful mechanism.