My HA configuration includes default_config and I have no config entry for recorder so according to the recorder docs statistics should be kept for all entities, but I see long term statistics only for some. e.g. the battery level of a Bluetooth monitor has long term statistics, but the value of an entity from an ESPHome device measuring current is shown only up to 10 days ago, i.e. no long term statistics.
It says “all entities” will be recorded in the absence of any filters.
The entity in question does have a unit of measurement, but it’s quite possible it doesn’t have an explicit state class, though I’m surprised that "MEASUREMENT’ isn’t assumed as a default in that case.
Is there a way in HA to change the state class of an existing entity? It’s not presented as an option in the dialog that allows the name, icon etc to be changed. Indeed is there any way from the UI to see what the state class is?
The device in question is “Made for ESPHome” so although it’s currently running the stock firmware I can update it as the YAML config is available for customisation.