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

Target rates seem to be showing time slots from previous period #814

Closed
2 tasks done
djdarlo opened this issue Mar 31, 2024 · 5 comments
Closed
2 tasks done

Target rates seem to be showing time slots from previous period #814

djdarlo opened this issue Mar 31, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@djdarlo
Copy link

djdarlo commented Mar 31, 2024

Describe the bug

I have a target rate set up from 4pm to 4pm. Target hours is set to 2.5 and the time is now 16:37. Last evaluated is showing as 16:38:45 but the target slots are showing as before this time.

image

Reproduction steps

Update target hours to any number and it still shows slots from before 4pm.

Expected behaviour

Show slots from 4pm today onwards.

Tariff Code

Agile

Integration Version

Latest

Home Assistant Version

Latest

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
@djdarlo djdarlo added the bug Something isn't working label Mar 31, 2024
@alfwro13
Copy link

Yep same here

@Markyt77
Copy link

Same here

@djdarlo
Copy link
Author

djdarlo commented Mar 31, 2024 via email

@alfwro13
Copy link

alfwro13 commented Apr 1, 2024

same today -target rates only appeared after 5PM

@Markyt77 Markyt77 mentioned this issue Apr 3, 2024
2 tasks
@BottlecapDave
Copy link
Owner

Hello and sorry for the late response.

Target rate data relies on the underlying rate information being available. If the rate data doesn't update to include the new agile pricing (i.e. because it's late), then new rate times won't be calculated. This can be determined by a couple of attributes as per the docs.

Attribute Type Description
target_times_last_evaluated datetime The datetime the target times collection was last evaluated. This will occur if all previous target times are in the past and all rates are available for the requested future time period. For example, if you are targeting 16:00 (day 1) to 16:00 (day 2), and you only have rates up to 23:00 (day 1), then the target rates won't be calculated.
rates_incomplete boolean True if rate information is incomplete and therefore target times cannot be calculated; False otherwise.

The last evaluated is just when HA last evaluated the state of the entity (same as native last_updated before I knew this existed). As the target rates corrected, I suspect this was the issue, so closing.

@BottlecapDave BottlecapDave closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants