Skip to content

Commit

Permalink
return start- and end-time in service call in local time
Browse files Browse the repository at this point in the history
  • Loading branch information
mampfes committed Feb 25, 2024
1 parent 9c347df commit 71d0468
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions custom_components/epex_spot/extreme_price_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ def find_extreme_price_interval(marketdata, start_times, duration: timedelta, cm
interval_price = round(interval_price, 2)

return {
"start": interval_start_time,
"end": interval_start_time + duration,
"start": dt_util.as_local(interval_start_time),
"end": dt_util.as_local(interval_start_time + duration),
"interval_price": interval_price,
"price_per_hour": round(interval_price * SECONDS_PER_HOUR / duration.total_seconds(), 2),
"price_per_hour": round(
interval_price * SECONDS_PER_HOUR / duration.total_seconds(), 2
),
}


Expand Down

0 comments on commit 71d0468

Please sign in to comment.