feat: HA sensor enrichment, inventory edit guard, recipe ingredient fix, bread shelf-life

- HA sensor: expiring_list now includes full product details (location, brand,
  category, days_remaining, opened_at, vacuum_sealed, default_quantity, etc.)
- HA sensor: new expired_list attribute with full product details per expired item
- HA sensor: new low_stock_list attribute (items with quantity ≤ 1, full details)
- HA sensor: new sensor=product endpoint (?action=ha_sensor&sensor=product)
  with optional filters: &id=, &name=, &location=
- HA cron webhook: expiry alert items now carry full product details
- Inventory edit: confirm dialog when quantity exceeds unit-specific threshold
  (prevents data loss from unit-confusion typos, e.g. 183 conf instead of 0.183)
- Recipe AI: explicit rule against ingredient form substitution
  (fresh tomatoes ≠ passata, fresh milk ≠ UHT ≠ cream, etc.)
- Shelf-life: opened bread rules (piadina 2d, bauletto/pancarrè 4d, pane 3d)
- docs/wiki: HA page updated with new schema, examples, product endpoint

Closes #125
This commit is contained in:
dadaloop82
2026-05-29 05:40:25 +00:00
parent bc39361246
commit 1637cc1020
11 changed files with 476 additions and 56 deletions
+5 -2
View File
@@ -1086,11 +1086,13 @@
"offline_ai_disabled": "Not available offline",
"offline_cache_ready": "Offline — {n} items cached"
},
"confirm_placeholder_search": null,
"confirm": {
"remove_item": "Do you really want to remove this product from inventory?",
"kiosk_exit": "Exit kiosk mode?",
"cancel": "Cancel",
"proceed": "Confirm"
"proceed": "Confirm",
"discard_one": "Discard 1 piece"
},
"location": {
"dispensa": "Pantry",
@@ -1102,7 +1104,8 @@
"unknown_hint": "Enter the product name and information",
"label_name": "🏷️ Product name",
"choose_location_title": "Which location?",
"choose_location_hint": "Choose the location to edit:"
"choose_location_hint": "Choose the location to edit:",
"confirm_large_qty": "You are setting the quantity to {qty} {unit}. This seems unusually high. Confirm?"
},
"screensaver": {
"recipe_btn": "Recipes",