BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
535 stars 49 forks source link

current_rate is offset incorrectly by one hour #831

Closed covertbert closed 2 months ago

covertbert commented 2 months ago

Describe the bug

  1. My current time is 1712 as of writing this mesage
  2. My timezone in HA is set to (GMT+00:00) London
  3. HA agrees that my current time is 1712
  4. Running the date command in the terminal in HA gives me Fri Apr 12 17:12:47 BST 2024
  5. The sensor.octopus_energy_electricity_xx_current_rate looks like this:
state_class: total
mpan: "xx"
serial_number: xx
is_export: false
is_smart_meter: true
tariff: E-1R-AGILE-23-12-06-G
start: "2024-04-12T16:00:00+00:00"
end: "2024-04-12T16:30:00+00:00"
is_capped: false
is_intelligent_adjusted: false
current_day_min_rate: -0.015645
current_day_max_rate: 0.2583
current_day_average_rate: 0.075453
data_last_retrieved: "2024-04-12T16:55:17.181984+01:00"
last_evaluated: "2024-04-12T16:09:18.182081+00:00"
unit_of_measurement: GBP/kWh
device_class: monetary
icon: mdi:currency-gbp
friendly_name: Electricity 22L3444132 1610012177566 Current Rate

As you can see it's offset incorrectly by 1 hour

Reproduction steps

See description above.

Expected behaviour

The sensor.octopus_energy_electricity_xx_current_rate should show the current rates, not the rates from 1 hour ago

Tariff Code

E-1R-AGILE-23-12-06-G

Integration Version

10.2.1

Home Assistant Version

2024.4.3

Fresh Install?

Fresh install

Home Assistant Logs

NA

Confirmation