You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database plugin provides the possibility to manually delete single entries in the DB via the plugin's web interface (dustbin button).
The value itself is delete correctly. However, the duration of the previous value should be increased by the same duration of the item that is deleted.
At the moment, using the manual delete button leads to a currpted database in which the durations are no longer consistent. This leads to wrong values when evaluating integral values from the db entries.
The text was updated successfully, but these errors were encountered:
Since the deleted value is not equal to the previous entry, wouldn‘t it be incorrect to increase the duration? It would imply that the previous value was valid for a longer time than it realy was.
msinn
changed the title
Database plugin: Increase duration of previous db entry when deleting
database: Increase duration of previous db entry when deleting
Aug 29, 2023
I get your point. But from my understanding, the db concept does not support invalid values. In addition, the purpose of the calculated duration for every db entry is not to mark the validity of the entry. The duration is there to calculate integral values, determin "device on" times, etc.
My conclusion is that the sum of all db durations in a certain time span should always reflect the time span itself. That's why I suggest to extend the duration of the previous duration upon deletion. In my opinion, it is wrong to manually delete a db entry without fixing the consistency of the duration.
The database plugin provides the possibility to manually delete single entries in the DB via the plugin's web interface (dustbin button).
The value itself is delete correctly. However, the duration of the previous value should be increased by the same duration of the item that is deleted.
At the moment, using the manual delete button leads to a currpted database in which the durations are no longer consistent. This leads to wrong values when evaluating integral values from the db entries.
The text was updated successfully, but these errors were encountered: