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 integration failed after upgrade to 2024.9.3 #126607

Closed
droidgren opened this issue Sep 24, 2024 · 25 comments · Fixed by #128860
Closed

Tibber integration failed after upgrade to 2024.9.3 #126607

droidgren opened this issue Sep 24, 2024 · 25 comments · Fixed by #128860
Assignees

Comments

@droidgren
Copy link

droidgren commented Sep 24, 2024

The problem

After the update most Tibber entities do not show up. ( Is unavailable )

  • I have no power production installed.
  • I can see the data in the Tibber App so there is no problem in data feed.
  • Using Watty

What version of Home Assistant Core has the issue?

core-2024.9.3

What was the last working version of Home Assistant Core?

core-2024.8.3

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

home-assistant_tibber_2024-09-24T09-49-58.864Z.log
config_entry-tibber-19db0f60a05e595f99e41682f2d02a2f.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error in rt_subscribe
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
    data = _add_extra_data(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
    live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Additional information

#125312

@home-assistant
Copy link

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)

@Danielhiversen
Copy link
Member

Danielhiversen commented Sep 24, 2024

Fixed in latest dev, and will be included in next release

@droidgren
Copy link
Author

droidgren commented Sep 24, 2024

Ok, I was hoping that it was included in todays update

@Danielhiversen
Copy link
Member

Ohh, then it is not fixed

@droidgren
Copy link
Author

droidgren commented Sep 25, 2024

I tried the work-around mentioned here. And now it works.

Neither of the solutions in this thread so far worked for me unfortunately. But I did manage to "solve" it by changing the following line in home.py:

live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])

to

live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"] or 0)

This way, if lastMeterProduction is null, which seems to be the problem (at least for me), it defaults to 0.

@fraban
Copy link

fraban commented Sep 28, 2024

Still same issue here - Tibber not working with
Core 2024.9.3
Supervisor 2024.09.1
Operating System 13.1
Frontend 20240909.1

hope that it is fixed with Core 2024.9.4

@fraban
Copy link

fraban commented Sep 29, 2024

Ok I solved - or its automatically solved after doing 2 Restarts of HA ... Hm - now it seems working again.
Still with
Core 2024.9.3
Supervisor 2024.09.1
Operating System 13.1
Frontend 20240909.1

  • thx

@nohn
Copy link
Contributor

nohn commented Sep 29, 2024

For me it works fine with 2024.9.4. This obviously doesn't mean that this bug is invalid, it just means that I can't reproduce it, which is very likely caused by the data, Tibber API gives you vs. the data, Tibber API gives me when queried.

Your suggested fix would need to be applied in https://github.com/Danielhiversen/pyTibber. I of course can create a PR there applying your suggestion. However, as I can't properly test it, I'd suggest, you do that @droidgren.

@jyourstone
Copy link

Since the fix was reported by me, I went ahead and created a PR in https://github.com/Danielhiversen/pyTibber.

@R3ffoTz
Copy link

R3ffoTz commented Oct 3, 2024

Still not solved with 2024.10.0

I only get 1 entity with corect data and that is Current price.
I have tries my accesstoken in the developer area at tibber and i works fine to poll currentL1, currentL2, currentL3 that is not present for me in the integration.


Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
    data = _add_extra_data(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
    live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2024-10-03 14:14:56.455 ERROR (MainThread) [tibber.home] Could not find consumption data.
2024-10-03 14:14:56.570 ERROR (MainThread) [tibber.home] Error in rt_subscribe
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
    data = _add_extra_data(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
    live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2024-10-03 14:14:56.699 ERROR (MainThread) [tibber.home] Could not find production data.

@jyourstone
Copy link

jyourstone commented Oct 3, 2024

I don't think the recent changes in pyTibber has been released yet.

@Goran129
Copy link

Goran129 commented Oct 3, 2024

Still not solved with 2024.10.0

I only get 1 entity with corect data and that is Current price. I have tries my accesstoken in the developer area at tibber and i works fine to poll currentL1, currentL2, currentL3 that is not present for me in the integration.


Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
    data = _add_extra_data(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
    live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2024-10-03 14:14:56.455 ERROR (MainThread) [tibber.home] Could not find consumption data.
2024-10-03 14:14:56.570 ERROR (MainThread) [tibber.home] Error in rt_subscribe
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
    data = _add_extra_data(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
    live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2024-10-03 14:14:56.699 ERROR (MainThread) [tibber.home] Could not find production data.

Same for me. I'm using Watty. Can that be why some are impacted and some not?

@R3ffoTz
Copy link

R3ffoTz commented Oct 3, 2024

Same for me. I'm using Watty. Can that be why some are impacted and some not?

Watty for me as well.

@VamoS81
Copy link

VamoS81 commented Oct 3, 2024

Same for me. Watty here

@skpgzamora
Copy link

Watty here as well. No solar panels

@SgtBBK
Copy link

SgtBBK commented Oct 4, 2024

Had the same problem, tried restarting HA multiple times without success.
Today I just reloaded the Service and it started working again, so maybe give that a try also (Restart Tibber Service)

@bullas82
Copy link

bullas82 commented Oct 4, 2024

Same issue for me. And I am also using watty, No solar panels.

@antsve
Copy link

antsve commented Oct 4, 2024

Same issue for me aswell, watty and no production.

@skpgzamora
Copy link

Had the same problem, tried restarting HA multiple times without success. Today I just reloaded the Service and it started working again, so maybe give that a try also (Restart Tibber Service)

Unfortunately didn't work, just 6 entities show up

@R3ffoTz
Copy link

R3ffoTz commented Oct 10, 2024

I tried with a Pulse and now it works fine. Watty must definetly be the problem.

@Goran129
Copy link

2024.10.2 and still Tibber don't work...

@niXta1
Copy link

niXta1 commented Oct 12, 2024

Same here, Watty with no solar and the sensors are unavailable.

@droidgren
Copy link
Author

It wont be fixed until next version of pyTibber is released and updated in Home assistant. So just wait.

@jyourstone
Copy link

jyourstone commented Oct 17, 2024

@Danielhiversen, would you be able to create a new release of pyTibber so it can be updated in Home Assistant and most likely solve this problem?

@epetwes
Copy link

epetwes commented Oct 19, 2024

Home Assistant Core 2024.10.2

Can confirm issues with Watty:

Error in rt_subscribe
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 461, in _start
data = _add_extra_data(data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 419, in _add_extra_data
live_data["lastMeterProduction"] = max(0, live_data["lastMeterProduction"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'

@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.