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
@@ -1037,11 +1037,13 @@
"offline_ai_disabled": "Indisponible hors ligne",
"offline_cache_ready": "Offline — {n} produits en cache"
},
"confirm_placeholder_search": null,
"confirm": {
"remove_item": "Voulez-vous vraiment supprimer ce produit de l'inventaire ?",
"kiosk_exit": "Quitter le mode kiosque ?",
"cancel": "Annuler",
"proceed": "Confirmer"
"proceed": "Confirmer",
"discard_one": "Jeter 1 pièce"
},
"location": {
"dispensa": "Garde-manger",
@@ -1053,7 +1055,8 @@
"unknown_hint": "Entrez le nom du produit et les informations",
"label_name": "🏷️ Nom du produit",
"choose_location_title": "Quel emplacement ?",
"choose_location_hint": "Choisissez l'emplacement à modifier :"
"choose_location_hint": "Choisissez l'emplacement à modifier :",
"confirm_large_qty": "Vous définissez la quantité à {qty} {unit}. Cela semble inhabituellement élevé. Confirmer ?"
},
"screensaver": {
"recipe_btn": "Recettes",