Skip to content

Commit 3770650

Browse files
authored
[energidataservice] Update JRuby example (openhab#16961)
Signed-off-by: Jimmy Tanagra <[email protected]>
1 parent 4cb1768 commit 3770650

File tree

1 file changed

+5
-5
lines changed
  • bundles/org.openhab.binding.energidataservice

1 file changed

+5
-5
lines changed

bundles/org.openhab.binding.energidataservice/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ rule "Calculate total price" do
119119

120120
time_series = TimeSeries.new # the default policy is replace
121121
spot_prices.each do |spot_price|
122-
total_price = spot_price.state +
123-
GridTariff.persisted_state(spot_price.timestamp).state +
124-
SystemTariff.persisted_state(spot_price.timestamp).state +
125-
TransmissionGridTariff.persisted_state(spot_price.timestamp).state +
126-
ElectricityTax.persisted_state(spot_price.timestamp).state
122+
total_price = spot_price +
123+
GridTariff.persisted_state(spot_price.timestamp) +
124+
SystemTariff.persisted_state(spot_price.timestamp) +
125+
TransmissionGridTariff.persisted_state(spot_price.timestamp) +
126+
ElectricityTax.persisted_state(spot_price.timestamp)
127127
time_series.add(spot_price.timestamp, total_price)
128128
end
129129
TotalPrice.persist(time_series)

0 commit comments

Comments
 (0)