]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix state and timestamp being discarded on store with alias (#16845)
authorJacob Laursen <jacob-github@vindvejr.dk>
Wed, 5 Jun 2024 16:32:53 +0000 (18:32 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Jun 2024 16:32:53 +0000 (18:32 +0200)
Fixes #16844

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/JdbcPersistenceService.java

index db4b77afaecb848e035a989c0da6eedf8ef80662..c0d4c82a7ce77e8fcdc80967c806171e8888035e 100644 (file)
@@ -154,7 +154,7 @@ public class JdbcPersistenceService extends JdbcMapper implements ModifiablePers
     @Override
     public void store(Item item, ZonedDateTime date, State state, @Nullable String alias) {
         // alias is not supported
-        scheduler.execute(() -> internalStore(item, null, item.getState()));
+        scheduler.execute(() -> internalStore(item, date, state));
     }
 
     private synchronized void internalStore(Item item, @Nullable ZonedDateTime date, State state) {