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

v10.2.1 Override Rates reporting in pence not pounds #839

Closed
2 tasks done
psfshr opened this issue Apr 16, 2024 · 2 comments
Closed
2 tasks done

v10.2.1 Override Rates reporting in pence not pounds #839

psfshr opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
breaking change The fix for this issue would be a breaking change in the integration bug Something isn't working

Comments

@psfshr
Copy link

psfshr commented Apr 16, 2024

Describe the bug

I have recently enabled override rates in the integration, however it appears that rather than reporting in decimal pounds as the normal rates it reports in decimal pence (i.e. 100 times greater).
A manual API call with curl retrieves both in decimal pence.

Reproduction steps

Retrieving my normal unit rates and agile rates via curl:

curl -u "<snip>" "https://api.octopus.energy/v1/products/VAR-22-11-01/electricity-tariffs/E-1R-VAR-22-11-01-H/standard-unit-rates/?period_from=2024-04-15T00:00Z&period_to=2024-04-16T00:00Z" | jq

  "results": [
    {
      "value_exc_vat": 23.482,
      "value_inc_vat": 24.6561,
      "valid_from": "2024-03-31T23:00:00Z",
      "valid_to": null,
      "payment_method": "DIRECT_DEBIT"
    },

curl -u "<snip>" "https://api.octopus.energy/v1/products/AGILE-24-04-03/electricity-tariffs/E-1R-AGILE-24-04-03-H/standard-unit-rates/?period_from=2024-04-15T00:00Z&period_to=2024-04-16T00:00Z" | jq

    {
      "value_exc_vat": 17.22,
      "value_inc_vat": 18.081,
      "valid_from": "2024-04-15T06:30:00Z",
      "valid_to": "2024-04-15T07:00:00Z",
      "payment_method": null
    },

Vs the values reported in HA from the integration...

previous_day_rates
tariff_code: E-1R-VAR-22-11-01-H
rates:
- start: '2024-04-15T06:30:00+00:00'
  end: '2024-04-15T07:00:00+00:00'
  value_inc_vat: 0.246561
  is_capped: false

previous_consumption_override_rates
tariff_code: E-1R-AGILE-24-04-03-H
rates: 
- value_inc_vat: 18.081
  start: '2024-04-15T06:30:00+00:00'
  end: '2024-04-15T07:00:00+00:00'
  tariff_code: E-1R-AGILE-24-04-03-H
  is_capped: false

Expected behaviour

Integration documentation states that both rates should return decimal pounds values, e.g. would expect:

previous_day_rates
tariff_code: E-1R-VAR-22-11-01-H
rates:
- start: '2024-04-15T06:30:00+00:00'
  end: '2024-04-15T07:00:00+00:00'
  value_inc_vat: 0.246561
  is_capped: false

previous_consumption_override_rates
tariff_code: E-1R-AGILE-24-04-03-H
rates: 
- value_inc_vat: 0.18081
  start: '2024-04-15T06:30:00+00:00'
  end: '2024-04-15T07:00:00+00:00'
  tariff_code: E-1R-AGILE-24-04-03-H
  is_capped: false

Tariff Code

As above

Integration Version

v10.2.1

Home Assistant Version

2024.4.3

Fresh Install?

Not specified

Home Assistant Logs

N/A

Confirmation

  • I confirm that I cannot find my solution within the documentation
  • I confirm that I cannot find my solution within the FAQ
@psfshr psfshr added the bug Something isn't working label Apr 16, 2024
@BottlecapDave
Copy link
Owner

Hello and thank you for raising this inconsistency. This should be fixed in the next release, however as it'll include a few breaking changes (including this one), I'm not sure on the timeline at the moment.

@BottlecapDave BottlecapDave added the breaking change The fix for this issue would be a breaking change in the integration label Apr 20, 2024
@BottlecapDave
Copy link
Owner

This should now be fixed in v11.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change The fix for this issue would be a breaking change in the integration bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants