I have temperature sensors which send and temperature every 60 seconds. Home Assistant ignores all measure consecutive measurements which have save value. This is annoying. Also secondary_info: last-updated shows 5 hours even measurements are taken every 60 seconds.
Yellow is a sensor with 60 s refresh. Green is a Zigbee sensor which have update interval between 5 to 60 min. Update threshold is about 0.7 C so temperature between two updates can vary ±0.7 C. With 60 s refresh rate temperature does not change 0.1 or more but both sensor data looks about the same.
Yes. Unfortunately. It is by design to reduce recorder writes and database size. It causes problems with derivative, trend, Riemann sum and similar sensors who all rely on frequent updates to get accurate readings. Some of those sensors have had a lot of thought to work around it.
Yes, that’s by design. Well, even more annoying would be database of size 10+GB because there would be tons of exactly same sensor readings inside…just take , say, any sensor with very frequent change report interval, like 1s or so… it would occupy a few gig’s of DB only for this one sensor.
So, i guess only true solution would be “correctly” written dependant sensors/integrations.
Haha, you were the one who inspired me to use Grafana And Influx, on my first ( And only Supervised ) instance, it worked and looked great, until i couldn’t figure out how to handle the ever increasing DB,
Eventually it lead to i removed both, and concentrated on learning HAOS, Yaml etc instead of 10th of cool colored graphs
But it was cool while it lasted
That last_reported looks promising. One user was wondering in another post: “will we get to see this available in dashboards as secondary information?”
For secondary_info there’s last-changed, last-updated and last-triggered but not last-reported.
Sensor data is stored for 10 day so saving all reported data should not be a huge problem. Default behaviour could be how it’s working at the moment.
After 10 day it doesn’t matter how frequently data has been logged.
By default, the recorder stores the sensor data for 10 days. Older data is purged automatically. The data for the last 10 days is taken from the recorder.
If you select a time frame that exceeds 10 days, the data is taken from the long term statistics table. The long term statistics data is sampled and averaged once per hour, to save storage History - Home Assistant
That’s only default setting. In my case data is stored for 30 days, not 10.
But, even for 10 days storing all data COULD be a problem. I have a few sensors with update interval 1s (or less). Having them all stored would be 86400 entries each day, which would result in just under one million entries (10 days), or over 2.5 million events for a period of 30 days. Multiply that with several sensors…
But even if update interval is 30 or 60 seconds, note that i have over 2000 entities, add a few hundred binary sensors, buttons, device trackers… and you come to 3000 or more. Now it slowly becomes a “huge problem” even for 10 days.
Looks like the last_reported is only updated when the temperture rounded to one decimal accuacy changes. Temperature can vary eg. between 20.15 and 20.24 celsius and last_reported is not updated. The difference between last_updated and last_reported is always 0.