Data Retention

Is there a way to create a statistics type entity via helpers?
I.e. at the moment I have an input_number but honestly it could be anything that can be updated…

I’m not aware of any way to explicitely set the state class on input numbers. You may have to use a template sensor as an intermediate.

How would one go about doing that?
If it helps I already have a sensor which I’m using for UI representation (sensor.input_number_name) to remove the unneeded decimal point

I get this error when I try to add a data-source according to the video above

image

Hello, I would like to ask, if I want to retention only 2 sensor for 30 days, so this config correct?

recorder:
  purge_keep_days: 30
  include:
    entities:
      - sensor.sma_daily_yield_wh

And other sensor keep retention default 10 days?

That’s not possible. You can only set days for the whole database.

Petro, Thank You your answer.

When I’ve setup mariaDB on my nas, how do I change the retention to infinite?
Maybe I missed the reply here. But is it then 0 for infinit or do I need to fix that different?