From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:14:26 +0000 (+1000) Subject: [energidataservice] Update JS example (#16963) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=bd2fd5555a6d688aa953f95cc18af68c7a14393b;p=openhab-addons.git [energidataservice] Update JS example (#16963) Signed-off-by: Jimmy Tanagra --- diff --git a/bundles/org.openhab.binding.energidataservice/README.md b/bundles/org.openhab.binding.energidataservice/README.md index 48b969c8eb..2b6301ebc3 100644 --- a/bundles/org.openhab.binding.energidataservice/README.md +++ b/bundles/org.openhab.binding.energidataservice/README.md @@ -739,7 +739,7 @@ logInfo("Spot price two hours from now", price.toString) ```javascript var hourStart = time.toZDT().plusHours(2).truncatedTo(time.ChronoUnit.HOURS); -var price = items.SpotPrice.history.historicState(hourStart).quantityState; +var price = items.SpotPrice.persistence.persistedState(hourStart).quantityState; console.log("Spot price two hours from now: " + price); ```