I have a helper input_number.imported_energy_quarter_hour_current_price
I added the following in my configuration.yaml
- platform: statistics
entity_id: input_number.imported_energy_quarter_hour_current_price
state_characteristic: mean
max_age:
days: 3650
But when adding a bar chart for this entity, there is a “no statistics found” ?!
Could please anyone help me? I really have no glue why this happens?
Best regards and thanks in advance,
Otto
Then there are other errors in the sensor’s configuration. For example, is the first line actually offset like this in your configuration or is it just a copy-paste error in the forum post?
Thanks for all your help.
Hm. The sensor from the template is created, but no statistics yet.
All I could find wrong was the indenting of the unit of measurement in the template, what I corrected.
I will wait until tomorrow, as the sensor is only updated each 15 minutes. Maybe there will be values until then. I hope at least.
But a question for being able to help myself better in the future:
Is there any log where possible errors can be seen? I am pretty familiar with linux (actually I have been working on linux only for more than 20 years) and reviewing logs, but still a little bit lost with HA…
You may need to create a Template Sensor from your Statistics Sensor. A Template Sensor provides a state_class option that allows you to specify how you want its long-term statistics to be recorded.
There’s more information about State Classes here.
Thanks a lot!
the state_class in the template seemed to be the missing part
There is still no statistic data for the card, but now I could choose the entity in the config
Btw. Now the statistics also show up in developer tools → statistics. I learned, that is a different thing, but obviously there are connections…
edit: now the data show up in the card THANKS man!