Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tibber price level just showing HIGH #130113

Open
kurtern84 opened this issue Nov 8, 2024 · 42 comments
Open

Tibber price level just showing HIGH #130113

kurtern84 opened this issue Nov 8, 2024 · 42 comments
Assignees

Comments

@kurtern84
Copy link

The problem

Price level in Tibber has started to show only HIGH regardless of price.

What version of Home Assistant Core has the issue?

core-2024.11.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tibber

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tibber

Diagnostics information

No response

Example YAML snippet

- sensor:
      - name: Price Level
        unique_id: 0123423443346423432
        state: "{{ state_attr('sensor.electricity_price_asvegen_12','price_level') }}"

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Nov 8, 2024

Hey there @Danielhiversen, mind taking a look at this issue as it has been labeled with an integration (tibber) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tibber can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tibber Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tibber documentation
tibber source
(message by IssueLinks)

@perosb
Copy link
Contributor

perosb commented Nov 8, 2024

This works fine for me.
What does the actual sensor show?

And also, what does the action action: tibber.get_prices return?

On another note, this was a breaking change that caused some headaches that price_level is now LOW/NORMAL/HIGH instead of the more detailed VERY_CHEAP > VERY_EXPENSIVE.

@kurtern84
Copy link
Author

Thanks for fast respons!
Are the variable VERY_CHEAP > VERY_EXPENSIVE coming back, or is it now only LOW/NORMAL/HIGH?
Just wondering because my automotation are responding to VERY_CHEAP > VERY_EXPENSIVE and so on.

action: tibber.get_prices return:

prices: Åsvegen 12: - start_time: "2024-11-08T00:00:00.000+01:00" price: 0.4541 level: HIGH - start_time: "2024-11-08T01:00:00.000+01:00" price: 0.4501 level: HIGH - start_time: "2024-11-08T02:00:00.000+01:00" price: 0.4485 level: HIGH - start_time: "2024-11-08T03:00:00.000+01:00" price: 0.4594 level: HIGH - start_time: "2024-11-08T04:00:00.000+01:00" price: 0.4504 level: HIGH - start_time: "2024-11-08T05:00:00.000+01:00" price: 0.4575 level: HIGH - start_time: "2024-11-08T06:00:00.000+01:00" price: 0.4753 level: HIGH - start_time: "2024-11-08T07:00:00.000+01:00" price: 0.6635 level: HIGH - start_time: "2024-11-08T08:00:00.000+01:00" price: 0.7108 level: HIGH - start_time: "2024-11-08T09:00:00.000+01:00" price: 0.6794 level: HIGH - start_time: "2024-11-08T10:00:00.000+01:00" price: 0.6753 level: HIGH - start_time: "2024-11-08T11:00:00.000+01:00" price: 0.6507 level: HIGH - start_time: "2024-11-08T12:00:00.000+01:00" price: 0.6235 level: HIGH - start_time: "2024-11-08T13:00:00.000+01:00" price: 0.5352 level: HIGH - start_time: "2024-11-08T14:00:00.000+01:00" price: 0.5175 level: HIGH - start_time: "2024-11-08T15:00:00.000+01:00" price: 0.485 level: HIGH - start_time: "2024-11-08T16:00:00.000+01:00" price: 0.4908 level: HIGH - start_time: "2024-11-08T17:00:00.000+01:00" price: 0.5075 level: HIGH - start_time: "2024-11-08T18:00:00.000+01:00" price: 0.5087 level: HIGH - start_time: "2024-11-08T19:00:00.000+01:00" price: 0.519 level: HIGH - start_time: "2024-11-08T20:00:00.000+01:00" price: 0.509 level: HIGH - start_time: "2024-11-08T21:00:00.000+01:00" price: 0.4984 level: HIGH - start_time: "2024-11-08T22:00:00.000+01:00" price: 0.4862 level: HIGH - start_time: "2024-11-08T23:00:00.000+01:00" price: 0.4757 level: HIGH

@perosb
Copy link
Contributor

perosb commented Nov 8, 2024

Probably not coming back, it was a change in pyTibber Danielhiversen/pyTibber#317 that wasn't marked as breaking. But yes, it broke my automations too.
You can add a custom sensors for it, something like:

template:
  - sensor:
      - name: Electricity Price Level
        unique_id: electricity_price_level
        state: >-
          {%- set price = float(states('sensor.electricity_price_infinity_8'), default=-10000) -%}
          {%- set avg_price = float(state_attr('sensor.electricity_price_infinity_8', 'avg_price'), default=0) -%}
          {% if price > -10000 %}
            {{- 'SUPER_CHEAP' if price <= avg_price*0.4 -}}
            {{- 'VERY_CHEAP' if price <= avg_price*0.5 and price > avg_price*0.4 -}}
            {{- 'CHEAP' if price > avg_price*0.5 and price <= avg_price*0.9 -}}
            {{- 'NORMAL' if price > avg_price*0.9 and price < avg_price*1.15 -}}
            {{- 'EXPENSIVE' if price >= avg_price*1.15 and price < avg_price*1.4 -}}
            {{- 'VERY_EXPENSIVE' if price >= avg_price*1.4 }}
          {%else%}
            unknown
          {%endif%}

Adjust interals as needed.

Below is the Tibber definitions:

VERY_CHEAP | The price is smaller or equal to 60 % compared to average price
CHEAP | The price is greater than 60 % and less or equal to 90 % compared to average price
NORMAL | The price is greater than 90 % and less than 115 % compared to average price
EXPENSIVE | The price is greater or equal to 115 % and less than 140 % compared to average price
VERY_EXPENSIVE | The price is greater or equal to 140 % compared to average price

@kurtern84
Copy link
Author

Okey! Thanks for the help:)

@Danielhiversen
Copy link
Member

I did not know Tibber has two different price levels :(
I changed to a different query, because that returns data easier to work with.

So now I am unsure what to do. Changing it back will be another breaking change :/

@kurtern84
Copy link
Author

For me, the solution above seems to work. Less work to change the automations. Also didn't know they had several price levels.

@TylonHH
Copy link

TylonHH commented Nov 8, 2024

yeah something is broken.
Tibber has this in their API

PriceLevel

Price level based on trailing price average (3 days for hourly values and 30 days for daily values)

Value Description
NORMAL The price is greater than 90 % and less than 115 % compared to average price
CHEAP The price is greater than 60 % and less or equal to 90 % compared to average price
VERY_CHEAP The price is smaller or equal to 60 % compared to average price
EXPENSIVE The price is greater or equal to 115 % and less than 140 % compared to average price
VERY_EXPENSIVE The price is greater or equal to 140 % compared to average price

PriceRatingLevel

Value Description
NORMAL The price is within the range of what is considered being normal (market dependent; see 'priceRating.thresholdPercentages' for limits)
LOW The price is within the range of what is considered being low (market dependent; see 'priceRating.thresholdPercentages' for limits)
HIGH The price is within the range of what is considered being high (market dependent; see 'priceRating.thresholdPercentages' for limits)

@Arturfrain
Copy link

Arturfrain commented Nov 15, 2024

@Danielhiversen and @perosb
The proposal with the electricity price level template sensor is nice and easy to quickly implement in the Homeassistant setup.
Isn't the actual "AVG Price" attribute of the Tibber electricity price the average of the day and not the trailing average of 3 days which was initially used for the price level scoring? In the case of today (see picture below) with the homemade template sensor the whole day would be price level NORMAL then. That means no responsivness to catch the low price today with the homemade sensor. Whith the (new Tibber) price level attribute you see the intraday distinction between HIGH, NORMAL and LOW. I guess they use the 3 day trailing average for this.

image

@perosb
Copy link
Contributor

perosb commented Nov 15, 2024

yes I know.
I guess it depends what you use it for. I had the custom template before the change in tibber integration as the 3 day trailing wasn't was I always was after.
For today, just using the custom template, would give you
image
But it's easy enough to customize as needed.

The old priceInfo would have given you the below for today and basically the same for tomorrow which is even cheaper ~0....so it depends.

"today": [
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "CHEAP"},
{"level": "CHEAP"},
{"level": "CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"},
{"level": "VERY_CHEAP"}

and this is with priceRating today:

{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},
{"level": "LOW"},

@Arturfrain
Copy link

Arturfrain commented Nov 15, 2024

@perosb : in my case (see price diagram i posted, it is today) i would have NORMAL over the whole day with the custom sensor which makes it impossible to control your consumers. Maybe your regional price is lower (?)
With the new Tibber price rating i see clear distinction between high and low over the day.

image

@TylonHH
Copy link

TylonHH commented Nov 15, 2024

Because:

Price Level provides a simple categorization of the current electricity price compared to the average of the last three days (e.g., “cheap”, “expensive”).
PriceRating offers a more detailed analysis over different time periods (hourly, daily, monthly) and evaluates prices based on historical data and market-dependent thresholds (“high”, “normal”, “low”).
But we don't use any thresholds or maketprices.

@Arturfrain
Copy link

@Danielhiversen
If you don’t plan to revert back to the price_level attribute which was used before, can you maybe change the name of the attribute to price_rating in the Homeassistant Integration to be consistent with the Tibber API documentation? I personally would love to have the initial price_level (5 levels) back because the template sensor discussed above does not use the rolling average over the last three days as the original Tibber sensor does. It uses the avg value which is the average over the day and therefore is no correct replacement of the original price_level attribute. I know that this is annoying and i don’t want to bother you. The integration is very nice though and I use it excessively in a lot of automations to control all kind of stuff in my house. Thank you for all your work !!

@perosb
Copy link
Contributor

perosb commented Nov 16, 2024

Meanwhile you can just create a statistical helper calculating whatever mean/average for any period and use that in the template.

@lordyavin
Copy link

I did not know Tibber has two different price levels :(

Seriously, you work as a "data scientist" at Tibber and claim that you don't know that your company maintains and provides different attributes at the price? Somehow I can't believe that.

But anyway, thanks for your work on the Tibber integration. Is Tibber actually paying you for this? Or are you allowed to work on it during your working hours?

@lordyavin
Copy link

I vote for bringing back the price level as provided by the Api. Let's see if I find some spare time to propose the necessary changes.

@Danielhiversen
Copy link
Member

I only work on this in my spare time, and I have nothing to do with the api for my work. I should still have read the documentation before I changed it.

Any contribution is much appreciated

@DarkDave667
Copy link

I asked the Tibber support about this Issue and they stated that all values of PriceLevel (CHEAP, EXPENSIVE...) are still active and nothing was changed there. They expect the issue in the HomeAssistant tibber integration. Could it be that the Integration takes now PriceRatinglevel (LOW, HIGH..) and assigns it to PriceLevel? The enity PriceRatinglevel is also not present at all in HA. I can also ask the tibber support for additional details about the API if somebody tells me what to ask :)

@Danielhiversen
Copy link
Member

Could it be that the Integration takes now PriceRatinglevel (LOW, HIGH..) and assigns it to PriceLevel?

That is correct, as written here: #130113 (comment)

@DarkDave667
Copy link

Oh sorry, this comment I didn't got. But why would it be a breaking change to put the Entity Price_Level back to PriceLevel and create a new Entity for PriceRatinglevel? Then both is in and PriceLevel is same as before.

@Danielhiversen
Copy link
Member

Danielhiversen commented Nov 27, 2024

But why would it be a breaking change to put the Entity Price_Level back to PriceLevel and create a new Entity for PriceRatinglevel?

It will be a breaking change for those who now have started to use the new PriceRatinglevel, they would need to update their automations again

@Arturfrain
Copy link

I would love to change my automations back to the price level with 3 day rolling average. The price rating level is too insensitive especially in the last weeks my automations did not work very well. Most of the time showing HIGH. Everything worked flawless the whole year and now I need to manually interact on and on due to this change. I think the Tibber price level with 3days rolling average was very well thought out by the programmer and makes a lot of sense. I still can’t understand why we at least can’t have this back as an additional attribute if the price rating needs to be kept.

@Danielhiversen
Copy link
Member

I still can’t understand why we at least can’t have this back as an additional attribute if the price rating needs to be kept.

We can for sure. But someone need to do the job :)

@ansgarkewitz
Copy link

First of all, thanks to whoever programmed it. However, I think that when such a major change is made, and it leads to problems, it should be reversed immediately, and you shouldn't wait until everyone comes up with their own solution, because that leads to a loss of trust and also means that support is reduced. The old parameters had 5 distinctions and not just 3, which allowed for better control. Therefore, the old state should be restored as quickly as possible and, if necessary, an additional sensor should be provided that only has 3 parameters.

@Danielhiversen
Copy link
Member

Danielhiversen commented Nov 27, 2024

It can not simple be reverted, since it was part of bug fix.
I think it better to not simple revert it, to avoid reintroduce the bug

@ansgarkewitz
Copy link

What are the options?

@Danielhiversen
Copy link
Member

I would suggest to make a fix to use PriceLevel instead of PriceRatinglevel for the price attribute

@TylonHH
Copy link

TylonHH commented Nov 27, 2024

However, I think that when such a major change is made

There was no big change nor a change on Tibbers API. Just a bug since HA Core handle stuff different.

Only the reference to the an API response changed here.

See Danielhiversen/pyTibber#317

@ansgarkewitz
Copy link

I don't want to put pressure on you, but is there a schedule for the adaptation?

@manuskript451
Copy link

@ansgarkewitz Maybe you can revert your home assistant to 2024.9.3 until this is fixed - I just did.
This PriceLevel retrieval is the most important piece of my whole HA installation - respectively especially relevant for everything that is not just a gimmick.
I'm not yet that far to adapt to custom REST requests or calculate historic/predictive data myself- I'd rather create a PR on this project instead but am sadly too busy at the moment.
Workarounds given here do not seem appropriate to me and given that Danielhiversen is maintaining this only in spare time, we should not increase pressure.

@ansgarkewitz
Copy link

Hello i already configured a solution based on the above template and calculating an average over 72h. So i dont need any amendments

@madebywitteveen
Copy link

Any updates? is the 5-level price information coming back ? my automations depend on this

@madebywitteveen
Copy link

Probably not coming back, it was a change in pyTibber Danielhiversen/pyTibber#317 that wasn't marked as breaking. But yes, it broke my automations too. You can add a custom sensors for it, something like:

template:
  - sensor:
      - name: Electricity Price Level
        unique_id: electricity_price_level
        state: >-
          {%- set price = float(states('sensor.electricity_price_infinity_8'), default=-10000) -%}
          {%- set avg_price = float(state_attr('sensor.electricity_price_infinity_8', 'avg_price'), default=0) -%}
          {% if price > -10000 %}
            {{- 'SUPER_CHEAP' if price <= avg_price*0.4 -}}
            {{- 'VERY_CHEAP' if price <= avg_price*0.5 and price > avg_price*0.4 -}}
            {{- 'CHEAP' if price > avg_price*0.5 and price <= avg_price*0.9 -}}
            {{- 'NORMAL' if price > avg_price*0.9 and price < avg_price*1.15 -}}
            {{- 'EXPENSIVE' if price >= avg_price*1.15 and price < avg_price*1.4 -}}
            {{- 'VERY_EXPENSIVE' if price >= avg_price*1.4 }}
          {%else%}
            unknown
          {%endif%}

Adjust interals as needed.

Below is the Tibber definitions:

VERY_CHEAP | The price is smaller or equal to 60 % compared to average price
CHEAP | The price is greater than 60 % and less or equal to 90 % compared to average price
NORMAL | The price is greater than 90 % and less than 115 % compared to average price
EXPENSIVE | The price is greater or equal to 115 % and less than 140 % compared to average price
VERY_EXPENSIVE | The price is greater or equal to 140 % compared to average price

I have this code but stays at 'NORMAL' but the the price is high now, does it take a while to build the average and showing correct?

@Arturfrain
Copy link

Probably not coming back, it was a change in pyTibber Danielhiversen/pyTibber#317 that wasn't marked as breaking. But yes, it broke my automations too. You can add a custom sensors for it, something like:

template:
  - sensor:
      - name: Electricity Price Level
        unique_id: electricity_price_level
        state: >-
          {%- set price = float(states('sensor.electricity_price_infinity_8'), default=-10000) -%}
          {%- set avg_price = float(state_attr('sensor.electricity_price_infinity_8', 'avg_price'), default=0) -%}
          {% if price > -10000 %}
            {{- 'SUPER_CHEAP' if price <= avg_price*0.4 -}}
            {{- 'VERY_CHEAP' if price <= avg_price*0.5 and price > avg_price*0.4 -}}
            {{- 'CHEAP' if price > avg_price*0.5 and price <= avg_price*0.9 -}}
            {{- 'NORMAL' if price > avg_price*0.9 and price < avg_price*1.15 -}}
            {{- 'EXPENSIVE' if price >= avg_price*1.15 and price < avg_price*1.4 -}}
            {{- 'VERY_EXPENSIVE' if price >= avg_price*1.4 }}
          {%else%}
            unknown
          {%endif%}

Adjust interals as needed.
Below is the Tibber definitions:

VERY_CHEAP | The price is smaller or equal to 60 % compared to average price
CHEAP | The price is greater than 60 % and less or equal to 90 % compared to average price
NORMAL | The price is greater than 90 % and less than 115 % compared to average price
EXPENSIVE | The price is greater or equal to 115 % and less than 140 % compared to average price
VERY_EXPENSIVE | The price is greater or equal to 140 % compared to average price

I have this code but stays at 'NORMAL' but the the price is high now, does it take a while to build the average and showing correct?

The problem is it uses the average of the day and not the average of three days which the price level attribute of Tibber does. I was already pointing to this in this thread (see above) . As many others I would like to have the original Tibber attribute back and not the erroneously added attribute which still is wrong and wrongly named in the Homeassistant integration. The only sense using the Homeassistant Tibber integration is to automate your consumers depending on price level attribute without need to write your own code to query the API. Without having the attributes identical matched to the Tibber API the whole thing makes no sense.

@madebywitteveen
Copy link

yes, you are right. I will call them tomorrow, see what happens
nice weekend, thanks

@TylonHH
Copy link

TylonHH commented Dec 14, 2024

I will call them tomorrow

You wanna call Tibber? That's useless. Their API offer both price levels. And you choose with your API call which price level you like to get. So what should Tibber do there?
That's why we have here workaround with the correct API call.

The one and only developer here didn't know that there are to price levels and changed it by mistake.
That's how I understand the situation here.

@madebywitteveen
Copy link

madebywitteveen commented Dec 14, 2024 via email

@Arturfrain
Copy link

Arturfrain commented Dec 14, 2024

For those who only need the original (3 day average price based) price level for their automations here my code for the API query sensor.
I translate the price level attribute to my language (here german, you can adapt yours). Put this in your sensor.yaml
Your Tibber Token needed.

# Tibber Preislevel
- platform: rest
  unique_id: tibber_price_level
  name: Tibber Price Level
  resource: https://api.tibber.com/v1-beta/gql
  method: POST
  payload: '{ "query": "{ viewer { homes { currentSubscription { status priceInfo { current { level }  } } } } }" }'
  json_attributes_path: "$.data.viewer.homes[0].currentSubscription.priceInfo"
  json_attributes:
    - current
  value_template: >
    {% if value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "NORMAL" %}
      normal
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "CHEAP" %}
      billig
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "VERY_CHEAP" %}
      sehr billig  
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "EXPENSIVE" %}
      teuer
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "VERY_EXPENSIVE" %}
      sehr teuer
    {% endif %}    
  scan_interval: 360
  headers:
    Authorization: !secret tibber_token
    Content-Type: application/json
    User-Agent: REST

@james-1987
Copy link

For those who only need the original (3 day average price based) price level for their automations here my code for the API query sensor. I translate the price level attribute to my language (here german, you can adapt yours). Put this in your sensor.yaml Your Tibber Token needed.

# Tibber Preislevel
- platform: rest
  unique_id: tibber_price_level
  name: Tibber Price Level
  resource: https://api.tibber.com/v1-beta/gql
  method: POST
  payload: '{ "query": "{ viewer { homes { currentSubscription { status priceInfo { current { level }  } } } } }" }'
  json_attributes_path: "$.data.viewer.homes[0].currentSubscription.priceInfo"
  json_attributes:
    - current
  value_template: >
    {% if value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "NORMAL" %}
      normal
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "CHEAP" %}
      billig
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "VERY_CHEAP" %}
      sehr billig  
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "EXPENSIVE" %}
      teuer
    {% elif value_json.data.viewer.homes[0].currentSubscription.priceInfo.current.level == "VERY_EXPENSIVE" %}
      sehr teuer
    {% endif %}    
  scan_interval: 360
  headers:
    Authorization: !secret tibber_token
    Content-Type: application/json
    User-Agent: REST

Better solution (less API req and faster change each hour) is to change scan_interval: really high and create a automation:

alias: tibber_api_timer
description: ""
triggers:
  - trigger: time_pattern
    hours: /1
    minutes: "0"
    seconds: "5"
    # backup if clock is not correct
  - trigger: time_pattern
    hours: /1
    minutes: "1"
    seconds: "1"
  - trigger: homeassistant
    event: start
conditions: []
actions:
  - action: homeassistant.update_entity
    data:
      entity_id:
        - sensor.tibber_price_level
mode: single

@Arturfrain
Copy link

Arturfrain commented Jan 8, 2025

@james-1987 : thanks for your input. What time are you using for scan interval in the sensor? Do I understand it right that you use a very long scan interval say more then one hour. But your automation triggers the sensor update over the automation hourly?
why don’t you just use 3600 as scan interval and that’s it ? Is it because you want the change exactly every hour ? Thanks for explanation in advance

@james-1987
Copy link

@Arturfrain I use 99999 as value, it doesn't really matter. All request is pushed from the automation and not the RESTful sensor. The homeassistant.update_entity override the scan_interval.

Best approach without automation is to have a really slim scan_interval value under 60 second to get a value the first minute each hour, but then you can easily hit the limit of API req together with the official Tibber that also do request on same IP/Token.

360 second/6 minutes is to long time to change to new value. Bad hit and your heavy electrical load can be ON to an old value for 6min.

With high value like 3600s/1h it can hit "sometime" every hour, it can trigger on the 59 minute (BAD), then you only having right value 1 minute and bad value the rest of the 59 minute.

No problems.

@Arturfrain
Copy link

@james-1987 : thank you, that makes absolutely sense. I will change my setup now 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests