mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[rrd4j] Improved the interpolation workaround (#17437)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
067a8e3f58
commit
89de130929
@ -373,7 +373,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService {
|
||||
if (timestamp - 1 > db.getLastUpdateTime()) {
|
||||
// only do it if there is not already a value
|
||||
double lastValue = db.getLastDatasourceValue(DATASOURCE_STATE);
|
||||
if (!Double.isNaN(lastValue)) {
|
||||
if (!Double.isNaN(lastValue) && lastValue != value) {
|
||||
Sample sample = db.createSample();
|
||||
sample.setTime(timestamp - 1);
|
||||
sample.setValue(DATASOURCE_STATE, lastValue);
|
||||
|
Loading…
Reference in New Issue
Block a user