#Why does the recorder write to the database when neither the status nor the attributes change?
1 messages · Page 1 of 1 (latest)
How could it tell you the last change or create proper graphs without saving whenever the state is updated?
The problem is that the status does not change, but it creates a new record.
I guess the simple answer is "because there's a new record to record" - the fact that it's an hour later and the data hasn't changed is important information.
Consider the alternative - imagine we are recording the temperature of a freezer and polling the sensor once a day:
Day 1: -18C
Day 2: -18C
Day 3: -18C
Day 4: -18C
Day 5: 25C
Without recording Day 2-4 we wouldn't lose the information that everything was working up until Day 4, just that it broke somewhere between Day 1 and 5.
Sure, if Recorder knew how frequently we polled the temperature sensor it might be able to reconstruct that information, but for many sensors that's not the case.
I'd like to have some kind of deduplication/merge/throttle support for the recorder.