Hello! I have a couple sensors that push updates every second. I like having the immediate value on my dashboard, and for that specific use case, the performance is good.
The problem arises when I tried to make complex graphs for those sensors. I use apexcharts-card, and my issue is that the graphs take a long time to load (or never load at all) when I set a graph span longer than three or four days. It makes sense, since the frontend needs to pull and compute a big history. I’ve already talked with the codeowner of this card, and they said that there isn’t much they can do; so I need to solve or work-around the problem on the history side of things.
So my question is: is there any way to filter the quantity of states that get saved to the history, maybe through configuration of the recorder integration, while still keeping the latest value as the entity state? Something like “save the current state every 10 seconds”, or “save one out of 10 states”, rather than “save every state”.
One of my sensors is a template sensor and the other uses the core MQTT integration. So far, I’ve used template sensor triggers to decrease the update frequency of the template sensor to 10 seconds, and the performance does improve - I know I could “wrap” my MQTT sensor in a template sensor to apply that workaround, but first I’d like to see if there’s an alternative solution available.
Thanks in advance!