Hi all, I need to store certain sensor values for a year to compute some consumption algorithm while for other sensors I need to store them just for a couple of days.
Is it possible? Setting purge_keep_days equal to 365 for all entities is not visible, the db will grow to much
Beside what Francis says, which allow you to keep all measurements and control on what to keep and how long, HA now automatically enables “Long Term Statistics”, which aggregates all sensors having a state_class of “measurement” with a 1h period (mean/sum/min/max).
Hi, I had a look at “Long Term Statistcs”. I set the state_class but it doesn’t seem to work with history_stats and bme280 sensor which are the sensors I need to keep.
The errors are: Invalid config for [sensor.bme280]: [state_class] is an invalid option Invalid config for [sensor.history_stats]: [state_class] is an invalid option
I’m using HA 2021.1.5, let me know if this is the problem.
I want to know the range of this parameter. What happens if I set it to -1? What happens if I set it to 0 or 31 or a character? The document lacks some detailed description of the parameter range and value. Also, the document description is a bit confusing. Maybe I don’t understand it well enough. Would you help me supplement it? Thank you very much!