-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
next_time
is miscalculated, offset
seems doubled
#169
Comments
next_time
is 2x of offset
next_time
is 2x of offset
next_time
is miscalculated, offset
seems doubled
Hi there :) This all looks as expected based on your configuration. The target sensors will never guarantee the same start/end times from day to day, especially if you're on an agile tariff. The The offset determines an offset to this best period for when the sensor should come on, which could be at an expensive time. This is designed to be used in automations with equipment where you want to perform a job (e.g. a robot vacuum using energy in it's battery) before you want it to charge during the cheap period. It appears from the sensor that for 13/03 the best time started at Assuming based on the name of the sensor, you probably want your start at This is all much better explained in the readme and accompanying examples. |
Hey @BottlecapDave Thanks for the detailed explanation. As mentioned, I configured my start-end times between 0:00-9:00. The integration found a 5 hour block between 3:00-7:30 (best period). The reason I configured a -3h offset is because I don't have a smart washing machine, so I wanted the sensor to turn on 3h early to trigger a notification for me to set the washing machine up with a 3h delay timer before bed. The problem is that the next_time changed from 3:00 to 21:00 (6h early) after configuring the offset (whilst the calculated best time window remained the same based on What is
Essentially, I understood that the sensor should be on between 3:00-7:30 with offset
I'm also not understanding the above sentence, does that mean configuring the offset will also change my desired start and end time? Making the 0:00-9:00 window a 21:00-6:00 window? This would explain why Thanks |
|
No worries :) I'm glad I helped you discover the bug. When you get round to fixing it, could you perhaps elaborate better on the |
This should be resolved in the latest release https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/v6.1.1. I've also updated https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy#offset which should elaborate more. |
Thanks, I think you meant 6.2.0. I'll test it out once installed though I think I'll keep it without offset as I've developed an automation which displays the actual best window and calculates an offset window for my small display. |
It was originally in 6.1.1, then I found another small issue which would have had an effect. I would also be interested in what your automation does differently when you say "actual best window" (out of curiosity) |
Thanks, I think you meant 6.2.0. I'll test it out once installed though I think I'll keep it without offset as I've developed an automation which displays the actual best window and calculates an offset window and displays it on my small display. |
Describe the bug
I have created a sensor with
offset: '-3:00:00'
, the first target time starts at2023-03-13T03:00:00+00:00
but the calculatednext_time
is2023-03-12T21:00:00+00:00
.Also reproduced it with offset
-01:00:00
where the next time was 2 hours instead of 1 hour early compared to the first target_rate time.Without
offset
,next_time
is correctly at 3:00.Expected behavior
I expected the
next_time
to be2023-03-13T00:00:00+00:00
Home Assistant Version
2023.3.3
Integration Version
v6.0.1
Fresh Install?
Fresh
Home Assistant Logs
Full sensor data:
I'd like to know if this is a bug or am I doing something wrong?
The text was updated successfully, but these errors were encountered: