BottlecapDave / HomeAssistant-OctopusEnergy

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

Target Sensor calculation #651

Closed Rhysgh closed 11 months ago

Rhysgh commented 11 months ago

Describe the bug

It looks like there may be a bug in its calculation, see images.

Current rates sensor has data untill -

this can also be seen in the UI on the dashboard.

with target sensor set 09:00 - 22:30 for 0.5 I would assume the 22:30 slot to be the one chosen but its missed.

image

image

at the moment I cant get into vs code so i cant remove the error for agile times and test 23:30..

Reproduction steps

as above

Expected behaviour

as above

Tariff Code

agile

Integration Version

9.2.1

Home Assistant Version

latest

Fresh Install?

Not specified

Home Assistant Logs

n/a

Confirmation

BottlecapDave commented 11 months ago

Hello. 22:30 has been set as the end time, whereas the slot you're referring to starts at 22:30 so wouldn't be picked.

Rhysgh commented 11 months ago

I assumed that but I can't choose 23:30 because of error handling image

is there a reason you are using end time and not start time? is it not more natural to use start time? conversationally you woudl say leccy is 3p at 10 ... not leccy is 3p ending at 10:30

Rhysgh commented 11 months ago

im an idiot, i just realised it .. it works perfectly ignore me sorry.