MTrab / energidataservice

Fetches spot prices from Energi Data Service
GNU General Public License v3.0
181 stars 26 forks source link

net_operator: N1 tariffs: -0.2755 #334

Closed AMajland closed 1 year ago

AMajland commented 1 year ago

Describe the issue

Its nice that the tariffs from n1 are 0 the rest of the year.

I do not know whether it is wrong tarifs that are reportet by n1 to the energi data service or if it is the integration that reads the wrong fields

In the past n1 has reported both a price and a discount and it looks like the integration is just showing the discount incl VAT - i.e the -27,55 instead of 0

https://n1.dk/priser-og-vilkaar

net_operator: N1 tariffs: additional_tariffs: transmissions_nettarif: 0.0725 systemtarif: 0.0675 elafgift: 0.8712 tariffs: '0': -0.2755 '1': -0.2755

"energidataservice": { "version": "1.3.7", "requirements": [ "async-retrying-ng==0.1.1", "CurrencyConverter==0.17.9" ] },

What version of Home Assistant Core has the issue?

2023.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Diagnostics information

config_entry-energidataservice-3514f879dba64fa49369d0441b45af9a.json (1).txt

Anything in the logs that might be useful for us?

No response

Additional information

No response

AMajland commented 1 year ago

For now i've just added the template {{ -0.697+0.2204 | float }} to get the price without elafgift and then it looks right

image

AMajland commented 1 year ago

Nettarif findes med https://api.energidataservice.dk/dataset/DatahubPricelist?offset=0&start=2023-08-01T00:00&filter=%7B%22ChargeOwner%22:[%22N1%20A/S%20-%20131%22],%22ChargeTypeCode%22:[%22CD%22]%7D&sort=ValidFrom%20DESC&timezone=dk

og rabatten findes med

https://api.energidataservice.dk/dataset/DatahubPricelist?offset=0&start=2023-08-01T00:00&filter=%7B%22ChargeOwner%22:[%22N1%20A/S%20-%20131%22],%22ChargeTypeCode%22:[%22CD%20R%22]%7D&sort=ValidFrom%20DESC&timezone=dk

MTrab commented 1 year ago

Tænker ikke rabatten bliver let at få med ind, sådan som integrationen er skruet sammen lige nu. Men kan godt se at den trækker den forkerte tarif - det får jeg lige fikset ASAP

MTrab commented 1 year ago

Fixed i næste version, hvor der ligeledes er tilføjet en ny template value, så du vil kunne sætte f.eks. {{0.03544-chargeowner_tariff|float(0)}} (her er Norlys FlexEl brugt som eksempel) ind i din additional cost, og så vil den trække operatør tariffen fra prisen igen.