home-assistant/core

Tibber get_prices doesn't return tomorrows prices until 18:00 (or sometime after 17:00)

Opened this issue · 7 comments

The problem

The action get_prices doesn't return tomorrows prices until somewhere between 17:00 and 18:00 despite the integration fetches them somewhere shortly after 13:00.

This is a template sensor that refreshes hourly and executes get_prices, as the state shows the count of new prices always increases at 18:00.
image

What version of Home Assistant Core has the issue?

2024.10.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

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

- trigger:
    - platform: time_pattern
      minutes: 0
      seconds: 0
  action:
    - service: tibber.get_prices
      data:
        start: "{{ now().replace(minute=0, second=0, microsecond=0) }}"
        end: "{{ today_at('23:59') + timedelta(days=1) }}"
      response_variable: future_prices
    - variables:
        price_data: >
          {{ future_prices.prices.Grankullen | default([]) | map(attribute='price') | list }}
  sensor:
    - name: Tibber Future Prices
      unique_id: tibber_future_prices
      state: "{{ price_data | count() }}"

Anything in the logs that might be useful for us?

No response

Additional information

No response

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)

Same Problem on 13 15 oclock No Data anymore ... And now complete broken. Whats Up?

Logger: tibber
Quelle: components/tibber/__init__.py:60
Erstmals aufgetreten: 23. Oktober 2024 um 12:17:49 (2 Vorkommnisse)
Zuletzt protokolliert: 23. Oktober 2024 um 23:05:18

Fatal error interacting with Tibber API, HTTP status: 429. API error: UNKNOWN / Unexpected content type: text/plain

@Frieker That is a different issue.

status: 429 means that you are rate-limited.

@EagleStClair Are you able to test this possible fix? https://github.com/home-assistant/core/compare/129014?expand=1

I'll test and report back, just have to wait for the next time slot when prices should update but doesn't.

@Danielhiversen it seems to have worked, well sort of. I tested get_prices some random times between 13:30 and 13:45 but still no prices for tomorrow.
I got a bit impatient and not sure if I'm doing this right so I reloaded the integration, after that get_prices returned tomorrows prices as well. But now I don't know if the fix worked or if reloading the integration got it to load.

I'll try again tomorrow without reloading the integration and see if it works.

What I did was to copy the tibber component from the linked bransch and placing as a custom_component, is that the right way to test? My understanding is that it will override the core integration if it exists as custom_component.

Yes, that should work.

Have you been able to see if it works?