mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[energidataservice] Update JS example (#16963)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
cd01019d8c
commit
f61d4ed3bf
@ -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);
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user