Advanced database configuration (per device/entity)

I can see that in the config file I can setup exclude and include settings, I am assuming that these basically say “don’t save x data in the recorder at all”, but is there a way of setting different polling rates/retention times/long term data retention / or whatever per … something? (or am I misunderstanding how that works?)

So, for example, something like the battery level of a sensor is probably only worth keeping for a shorter time, and maybe only worth polling say once per day or so (depending on the device), and something like an outside temp sensor might only need to be polled once per hour, but an inside sensor I might want to get a more minute by minute record to see how my hvac system is working. and I might want to keep some data as long as possible, but other data I may decide I don’t really need to keep them for more than a few days / weeks / months.

I realize that the effort to configure something like this would be high and probably not worth it for most (and honestly, I might not even do it myself), so I’m mostly interested in understanding if it’s reasonably possible (without custom coding).

The recorder is not polling sensors, so it has no settings for it either. Sensors, or their respective integrations, determine how often they send new data. If they have new data, it is recorded. If the dats does not change, it isn’t recorded.

Only long term storage is condensed to min, max, and average per hour - you could consider that polling. That too isn’t configurable. Only measurements and metered values are stored in long term statistics. Note that if the recorded values are less than a couple of times an hour, statistics might have more data recorded as that records 3 values per hour.

So basically the only control you have is to include/exclude sensors, and to determine how many days are kept for short term. If you exclude sensors from the recorder, they also won’t be able to store long term statistics.

1 Like

Thanks! that was basically what I figured from poking through the docs, but I figured I’d ask just in case I didnt get something.