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
74.21k stars 31.16k forks source link

Tibber Monthly cost not accurate #84403

Closed SanderKo85 closed 1 year ago

SanderKo85 commented 1 year ago

The problem

Hi,

in my Tibber integration the "Monthy cost" entity (ID sensor.monthlycost*) is not the same value as the Tibber app and website dashboard. In my example: I am this month at EUR 93,51, but HA shows me EUR 300,26.... that is quite off if you ask me :) The strange thing is that is comes with jumps in the graph, and that represents a lots of energy which is obviously not possible.

Hope we can solve this. Thank you!

graph in ha tibber graph

What version of Home Assistant Core has the issue?

2022.12.8

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

config_entry-tibber-3b5ec8b394a50243440f29fe43ab2816.json(1).txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year 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` Change the title of 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.

(message by CodeOwnersMention)


tibber documentation tibber source (message by IssueLinks)

ramondeklein commented 1 year ago

It looks that for some reason the daily increments are added multiple times. My daily increase is exactly twice the daily cost that I read from Tibber. Also the total consumed kWh is exactly double from what I see in Tibber's dashboard.

This is my Tibber dashboard: image

This is what I get from HA: image

image

SanderKo85 commented 1 year ago

Ah, indeed, seeing exactly the same here.

dieugab commented 1 year ago

Same issue here. Monthly cost is not accurate with the Tibber app

ajpohv commented 1 year ago

The same problem here. Twice costs + unstable margin.

formidablemagnus commented 1 year ago

Same problem, anybody found a fix or workaround?

dieugab commented 1 year ago

Same problem, anybody found a fix or workaround?

As a workaround, I'm using a Utility meter helper set to reset monthly and pointed it at the cost daily sensor provided by the Tibber integration. Seems to be a lot more accurate with the app.

jdalesjo commented 1 year ago

I have the same problem. One site has a Tibber Pulse and the monthly cost is different (a lot, like 3 times ... it also goes up and down) from the sensor compared to the app. On my other site I have no Pulse and the monthly cost is the same in the app and HA. When installing the integration I can only choose the Pulse entity and can't get the same value as the other site.

SanderKo85 commented 1 year ago

That is wierd, the Pulse have nothing to do with pricing calculation. Only the real supplier energymetersystem from the building is used as source of truth, not the Pulse anyway.

jdalesjo commented 1 year ago

image IMG_0824

Also the consumption is way off for the month, but the daily consumption is correct.

beebee commented 1 year ago

I have the same problem. One site has a Tibber Pulse and the monthly cost is different (a lot, like 3 times ... it also goes up and down) from the sensor compared to the app. On my other site I have no Pulse and the monthly cost is the same in the app and HA. When installing the integration I can only choose the Pulse entity and can't get the same value as the other site.

I have also this issue with my Pulse site. Can you check on the HA Tibber integration page for the Pulse (and other Sites) device what the "Download Diagnostics" information contains about each sites homes? On my Pulse site I have 5 entries for homes listed in the HA info which is strange as I am a new customer for some days only and only have one site. I have the suspicion that changing the config in the Tibber Mobile App(which keeps asking me to enhance my home settings despite all being set - so I changed it in the Tibber Mobile App a couple of times) creates a new home on Tibber API and this in HA? Now looking at the HA Tibber integration sensor.py there seems to be some migration going on from old to new homes but I am a newbie for python. Could it be possible that these multiple homes or migration expose the issue with the Cost and Energy sensor multiples/spikes? I also lost some of the sensors history which seems to correlate with changing the Sites heating info in the Tibber Mobile App.

Matze4711 commented 1 year ago

Is there some progress coming in short time? I do have the same issue with having lilke triple monthly cost and consumption in HA compraed to App/Real.

weirdo1971 commented 1 year ago

same here...

Blutbart commented 1 year ago

Every Restart from HA the Price recalculate in The App from Tibber is the Correct State but in Home Assistant are the State is wrong

habitoti commented 1 year ago

Is that being looked at at all? Probably not a big deal to fix, but not addressed for over half a year now...

jdalesjo commented 1 year ago

Not sure from when … but last few months the values have been correct and still are. I believe the issue is resolved. :)

habitoti commented 1 year ago

Definitely not for me (using all the latest software). Right now it says 34€, while Tibber app (correctly) shows 20€. Maybe it‘s not correctly considering my PV, or having troubles with HA restarts — don‘t know. It‘s always too much, sometimes ridiculously rising on a single day.

daloki83 commented 1 year ago

Same for me - problem still exists: Tibber App 11€ sensor.monthly_cost_XXX_XX 21,82€

Home Assistant 2023.7.1 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest

@Danielhiversen any ideas?

felixtriller commented 1 year ago

At least in Germany, the Tibber app shows costs with VAT and Home Assistant is without.

daloki83 commented 1 year ago

@felixtriller are you sure? 10-11o'clock: HA sensor.electricity_price_XXX_XX = 0,23 EUR/kWh Tibber APP = 23 cent // 0,09€ API = lets do the math: "consumption": 0.311 x "unitPrice": 0.2299675 = 0,0715198925 + "consumption": 0.311 x "unitPriceVAT": 0.0367175 = 0,0114191425 =0,082939035€ so rounded this hour costs me 0,09€ same as Tibber APP says

HA energy dashboard doesnt give exact price per hour, but should be fine and with tax (in germany)

felixtriller commented 1 year ago

@daloki83 at least I thought so, yes. I have sensor.monthly_cost_xxx at 19,74 € (same as my energy dashboard) which matches almost with the 24 € the Tibber app shows for July when you add 19 %.

For June my energy dashboard shows 91,49 € which matches the 109 € from my Tibber app.

daloki83 commented 1 year ago

@felixtriller thats strange. Thats my 1st month with Tibber so i dont have data from last month. But you're right when you say, there is a deviation in the monthly calculation. Right now for this month HA says 7,36€ and Tibber APP 11€ Checking this on a daily base HA 07.07.23 1,32€ Tibber APP 1,74€
HA 06.07.23 1,49€ Tibber APP 1,91€ HA 05.07.23 1,46€ Tibber APP 1,88€

So at least for me there must be something else than the 19% VAT/TAX.

For the price in energy dashboard you also used the "sensor.electricity_price_XXXstr_XX" or anything else?

beebee commented 1 year ago

@felixtriller thats strange. Thats my 1st month with Tibber so i dont have data from last month. But you're right when you say, there is a deviation in the monthly calculation. Right now for this month HA says 7,36€ and Tibber APP 11€ Checking this on a daily base HA 07.07.23 1,32€ Tibber APP 1,74€ HA 06.07.23 1,49€ Tibber APP 1,91€ HA 05.07.23 1,46€ Tibber APP 1,88€

So at least for me there must be something else than the 19% VAT/TAX.

For the price in energy dashboard you also used the "sensor.electricity_price_XXXstr_XX" or anything else?

HA Energy Dashboard price is correct - it is only for the energy consumed on the energy price. Tibber App also adds the Basecost per day already (Grundgebühr+Netznutzungsgebühr+Messstellengebühr+VAT) = around 9 Euros extra per month depending on local setup and network costs.

daloki83 commented 1 year ago

Ahhh that explains a lot. thx @beebee

About the "sensor.monthly_cost_XXX" is this similar (like a prediction incl. general cost) or just broken? Is there a way to "work/get" with the value from energy dashboard? So i could create a helper which would add such costs etc.

beebee commented 1 year ago

"sensor.monthly_cost_XXX" behaves strange here too with peaks up AND down sometimes that do not match consumption. But it got better lately for me. I had the impression that changing settings in the Tibber app provoked multiples in that sensor in around March when I started with Tibber but could not verify that. I think the monthly cost data sensor is a projection from Tibber and don't rely on it.

Danielhiversen commented 1 year ago

A related bug was fixed by https://github.com/home-assistant/core/pull/96276 So maybe this is also solved

daloki83 commented 1 year ago

at least for me were way to far from real costs (>50€).

So i made my own sensor with that code:

sensor:
  - platform: rest
    name: tibber_month_cost_with_addition_cost
    resource: https://api.tibber.com/v1-beta/gql
    method: POST
    payload: '{ "query": "{viewer {homes {consumption(resolution: MONTHLY, first: 1 ) {nodes {cost}}}}}" }'
    value_template: >
      {% set tibber_cost = value_json.data.viewer.homes[0].consumption.nodes[0].cost %}
      {% set rounded_tibber_cost = tibber_cost | round(2) %}
      {% set additional_value_1 = 8.41 %}  
      {% set additional_value_2 = 4.49 %}   
      {{ (rounded_tibber_cost + additional_value_1 + additional_value_2) | round(2) }}
    scan_interval: 3600
    unit_of_measurement: EUR
    headers:
      Authorization: !secret tibber_sensor_secret_token
      Content-Type: "application/json"

additional_value_1 = Grid usage and metering point fees // Netznutzungs- und Messstellengebühren 8,41 €/Monat additional_value_2 = Tibber fee // Tibber Gebühr 4,49 €/Monat

For me its working and showing a bit more detailed the same as the tibber app. BUT that is also my first month at Tibber and at the moment i have no idea how to tell the Tibber API to show the current month. So maybe you habe to play a bit to find the correct number for your needs.

https://community.home-assistant.io/t/tibber-total-cost-how-to-get-it-in-ha/596942

EDIT: Rounding issues fixed

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.