lozzd / octopus-energy-rates-card

This lovelace card for Home Assistant displays the Octopus Energy rate prices per each 30 minute slot
MIT License
65 stars 22 forks source link

Fix rates for Octopus integration v8.0.0 #20

Closed jamesog closed 1 year ago

jamesog commented 1 year ago

With the release of v8.0.0 of the Octopus integration a breaking change was made to the rates. We now need to read the all_rates attribute, use the valid_from attribute on each rate instead of from, and the value_inc_vat attribute instead of rate.

lozzd commented 1 year ago

oh wow - thanks for grabbing this, I hadn't even seen there was an update let alone install it. Annoying because we now have to hope people will update both halves at the same time or it will break.

jamesog commented 1 year ago

Yeah, I was wondering if I should try and handle both, but it's slightly tricky. If you like I can give that a go. It might just be a case of checking for both top-level keys and storing that as a comparison later.

I'm sort of assuming if people are updating things via HACS they're doing everything, but I don't know how true that is.

lozzd commented 1 year ago

Yeah it's fine, we'll just roll forward. Thanks again

anothermort commented 1 year ago

Thanks for all your work. A very quick fix.