home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.06k stars 29.13k forks source link

Problems in calculation: tibber #113176

Open Joba0112 opened 4 months ago

Joba0112 commented 4 months ago

The problem

I read out the tibber-data and i'm not producing electricity. So the electricity meter gives back:

sensor: production on the last mile: -1 IMG_8786

[tibber gave a new name!]

HA can't calculate with value -1.

What version of Home Assistant Core has the issue?

newest

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

No response

Anything in the logs that might be useful for us?

No response

Additional information

IMG_8787

home-assistant[bot] commented 4 months ago

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 commented 4 months ago

It is the value reported by Tibber api

Joba0112 commented 4 months ago

The electrity meter gives a '-1' when there is no production. This counter is not in use, because the electricity meter counts only in one direction (selling/Consumption). Am 13.03.2024 um 00:11 schrieb Daniel Hjelseth Høyer @.***>: It is the value reported by Tibber api

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

steff94 commented 3 months ago

Same issue and interessted in a solution :)

"2024-04-10 15:48:34.837 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.last_meter_production_wolfi from integration tibber has state class total_increasing, but its state is negative. Triggered by state -1 with last_updated set to 2024-04-10T13:34:59.999999+00:00. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tibber%22"

Danielhiversen commented 3 months ago

Could someone try this fix? https://github.com/home-assistant/core/compare/issue_%23113176?expand=1

Danielhiversen commented 2 months ago

@Joba0112 @steff94 Could you please test if the fix works for you?

I am not able to reproduce it here, so I need some help to test it.

rustysponge commented 1 month ago

I have the same problem as @Joba0112 and would be happy to assist. Not sure if I applied your change correctly (I just quickly ssh'd into my HA instance and changed that line of code in the tibber component), but after changing the version for pyTibber and restarting my HA the problem seems to have disappeared: the value of the last_meter_production entity went from -1 to 0 after the restart.

rustysponge commented 1 month ago

Maybe I was to quick about that one. I just re-checked my logs and found this error (again). So, I need to test this any other way (then I would need some help to test it) or the problem lies elsewhere?

`Logger: homeassistant.components.sensor.recorder Quelle: components/sensor/recorder.py:325 Integration: Sensor (Dokumentation, Probleme) Erstmals aufgetreten: 15:45:10 (1 Vorkommnisse) Zuletzt protokolliert: 15:45:10

Entity sensor.last_meter_production_XYZ_123 from integration tibber has state class total_increasing, but its state is negative. Triggered by state -1 with last_updated set to 2024-06-06T13:39:59.999999+00:00. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tibber%22`

I also noticed some other/new (?) errors regarding the tibber integration since I changed that file. I will undo the change for now, I guess...