Open callacomp opened 1 year ago
If I read that right, you're collection would have been on Monday, so at mid-night last night it changed to indicates 2 days. If the dark blue history bar indicated 3 days, that would seem to be the expected behaviour. Then when HA re-queried the website at 01:37, it returned the collection date for Monday week, hence the jump to 9 days.
Given the jump in dates seems to match the last update time, I suspect they updated the schedule at some point between the two most recent HA queries.
The used API does return a currentScheduledDate
and originalScheduledDate
for the next and last pickup. The source uses the currentScheduledDate
so it should have picked the right date if they updated their data in time. Unfortunately this is not really reproducible. But I checked with the currentScheduledDate
argument from the last pickup
(see below) and the source would have returned the right date (2023-05-27).
currentScheduledDate: "2023-05-27T05:30:00.000Z", originalScheduledDate: "2023-05-28T23:00:00.000Z"
It's normally a Monday, but over a Bank Holiday it changes to a Saturday. It's right today on gov website but i can't tell what it was yesterday. Seems idd they would have updated it between updates. I'll have to check next bank holiday, but that's some time away.
In HA, you could set up a sensor to log the collection dates being used - that way you could view a history of collection dates the script has retrieved. Probably not something you'd want running all the time, but might be worth considering in December when the next public holidays are due.
Just missed my bin collection. Yesterday it was showing as in 2 days time, yet today on the gov website it says today. The history shows the jump.