From cd01019d8cdfab11968918f557f8c5e17d7d8919 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Sun, 30 Jun 2024 00:13:03 +1000 Subject: [PATCH] [energidataservice] Update JRuby example (#16961) Signed-off-by: Jimmy Tanagra Signed-off-by: Ciprian Pascu --- .../org.openhab.binding.energidataservice/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/org.openhab.binding.energidataservice/README.md b/bundles/org.openhab.binding.energidataservice/README.md index ed764749db2..48b969c8eb2 100644 --- a/bundles/org.openhab.binding.energidataservice/README.md +++ b/bundles/org.openhab.binding.energidataservice/README.md @@ -119,11 +119,11 @@ rule "Calculate total price" do time_series = TimeSeries.new # the default policy is replace spot_prices.each do |spot_price| - total_price = spot_price.state + - GridTariff.persisted_state(spot_price.timestamp).state + - SystemTariff.persisted_state(spot_price.timestamp).state + - TransmissionGridTariff.persisted_state(spot_price.timestamp).state + - ElectricityTax.persisted_state(spot_price.timestamp).state + total_price = spot_price + + GridTariff.persisted_state(spot_price.timestamp) + + SystemTariff.persisted_state(spot_price.timestamp) + + TransmissionGridTariff.persisted_state(spot_price.timestamp) + + ElectricityTax.persisted_state(spot_price.timestamp) time_series.add(spot_price.timestamp, total_price) end TotalPrice.persist(time_series)