Tibber binding: Calculate todays average price to calculate current price level of today

Since the current price level is based on the last 3 days average data, there is some problem to use that value on weekends and when a new week starts, today’s average is lower on weekends.

Is it possible to use the binding to calculate today’s average price and then set 60% lower as VERY_CHEAP breakpoint and so on or how is it possible to solve the problem?

You can use a rule & persistence service to calculate your own item holding an average value, e.g. average since midnight or last 24 hours average

The problem with calculating average on last 24 hours is the same as with average on last 3 days. If the new day is more expensive than last 24 hours the calculation will say it is expensive and my controlled devices will not start.

I want to calculate average of current day spot price and run heating of the house and so on when the price is 60% below average.

I need to collect price data for today from tibber and calculate an average and then set a breakpoint at 60% below.

A similar solution is to collect price data for today from tibber and run the heater on the x most cheapest hours.

Regardless, I need to get today’s data from tibber first to be able to do the calculation. Can I do it with tibber binding or do I need to create my own connection to tibber to get what I need?

I cannot help with the tiber binding, just wanted to say that with persistence you can create your average on your own and don’t need to rely on the binding for the average.

Last 24h was just am example, you can also just use today’s average since midnight or any other duration.

The function is:

<item>.averageSince(ZonedDateTime)

Therefore you are very flexible once your have the current price.

Thanks, good to know.

In my case I need to get all spot prices for the current day first to do the calculation and then figure out when to use the heater.

With average calculation on current spot price together with the history you don’t know when to use the heater during the day.

With the Tibber API I can get spot prices for current day and after 1PM (I think) I can also get spot prices of next day. That’s why my question is about using the Tibber binding and if I can do the above with it or have to write my own script.

The Tibber app for Homey has a really nice switch item “Current price is at its lowest among the next X hours” that works better with sudden price drops, I really wish the OH3 Tibber binding implemented that.
Tibber App for Homey | Homey seems to be published by Tibber themselves so maybe it would be possible to ask them to add more endpoints to their API instead of having to build this logic locally…