Verify basket, subscribe and vacation-hold round trips against a live account
Validate / hassfest (push) Failing after 5s
Validate / pytest (push) Failing after 7s
Validate / HACS (push) Failing after 16s

Three fixes the round trips found:

The produce-box select reported the SUBSCRIPTION rather than the delivery. A
one-off switch changes the delivery while the standing order keeps naming the
old box, so during the exact week someone had changed it the entity showed the
wrong box. It now reads the order.

parse_vacation_holds looked for ISO dates. The page writes 'Tuesday, Dec 1 -
Monday, Dec 7', so it reported no holds on an account that had one — which is
indistinguishable from having none. Its test asserted the same wrong format,
so the test passed while the parser was blind.

Adds hold removal (POST /s/submit/pause-range-remove), whose popup only exists
while a hold does.
This commit is contained in:
flan
2026-08-03 20:35:49 +00:00
parent e7427082e3
commit 6ec06ee31a
3 changed files with 74 additions and 15 deletions
+9 -4
View File
@@ -56,12 +56,17 @@ class FreshHarvestBoxSelect(FreshHarvestEntity, SelectEntity):
@property
def current_option(self) -> str | None:
"""The subscribed box.
"""The box actually arriving in the changeable delivery.
Read from the subscription rather than the switch popups: the box you
are on is the one the site offers no switch control for, so it has no
name there.
NOT the subscription. A one-off switch changes the delivery while the
standing order keeps naming the old box — verified live: after
switching the next delivery to Medium, the subscription still read
Small. Reporting the subscription here would show the wrong box for
exactly the week someone had changed it.
"""
order = self.coordinator.data.open_order or self.coordinator.data.next_order
if order is not None and order.box_name:
return order.box_name
subs = self.coordinator.data.subscriptions
return subs[0].name if subs else None