Skip to content

Commit 5a3a0c0

Browse files
authored
[rrd4j] Improved the interpolation workaround (openhab#17437)
Signed-off-by: Jörg Sautter <[email protected]>
1 parent ce03930 commit 5a3a0c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ private synchronized void writePointToDatabase(String name, double value, long t
373373
if (timestamp - 1 > db.getLastUpdateTime()) {
374374
// only do it if there is not already a value
375375
double lastValue = db.getLastDatasourceValue(DATASOURCE_STATE);
376-
if (!Double.isNaN(lastValue)) {
376+
if (!Double.isNaN(lastValue) && lastValue != value) {
377377
Sample sample = db.createSample();
378378
sample.setTime(timestamp - 1);
379379
sample.setValue(DATASOURCE_STATE, lastValue);

0 commit comments

Comments
 (0)