Wire produce-box switching as a select entity
Validate / hassfest (push) Failing after 6s
Validate / pytest (push) Failing after 10s
Validate / HACS (push) Failing after 17s

The boxes are not in the Algolia catalogue and their category pages look empty
because the grid calls every option 'Georgia Box' — each option's real name is
only in its own select-basket popup, so listing reads them there.

POST /s/submit/select-basket carries a scope the add-on endpoints do not:
popup-toggle is 'do' for the next delivery or 'so' for the standing order. The
select uses 'do', because a mistaken permanent change is the worse one to undo.

Also makes the popup regexes whitespace-tolerant. The site writes both
openPopup("x","y") and openPopup("x", "y"), and the strict form silently
matched nothing on the basket pages.
This commit is contained in:
flan
2026-08-03 20:31:13 +00:00
parent 0a218acd45
commit e7427082e3
7 changed files with 250 additions and 3 deletions
+5
View File
@@ -56,6 +56,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`todo.fresh_harvest_add_ons`; box contents stay read-only on
`sensor.*_next_delivery_items`.
- Produce box switching: `POST /s/submit/select-basket`, exposed as
`select.fresh_harvest_produce_box` with all ten boxes. Switching a box is not
adding an add-on — you change which box arrives, not what is inside it — so
it is a select, where add-ons are a to-do list.
### Known gaps
- Entities are deliberately NOT exposed to the conversation agent yet.