feat: add bed cooled notification after print completes (#378)

Notify users when the print bed cools below a configurable threshold
(default 35°C) after a print finishes, so they know when to remove parts.

- Backend: DB migration, model, schemas, notification template, service
  method, background cooldown monitor (polls every 15s, 30min timeout)
- Frontend: event toggle in provider card/modal, threshold setting in
  Settings > Notifications, i18n keys for all 5 locales
- Tests: 4 backend + 4 frontend tests
- Docs: README, website, wiki updated
This commit is contained in:
maziggy
2026-02-15 10:59:07 +01:00
parent 045326d8ca
commit 53a4933c36
26 changed files with 441 additions and 55 deletions
@@ -163,6 +163,9 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
{provider.on_ams_ht_temperature_high && (
<span className="px-2 py-0.5 bg-amber-600/20 text-amber-300 text-xs rounded">AMS-HT Temp</span>
)}
{provider.on_bed_cooled && (
<span className="px-2 py-0.5 bg-teal-500/20 text-teal-400 text-xs rounded">Bed Cooled</span>
)}
{provider.quiet_hours_enabled && (
<span className="px-2 py-0.5 bg-indigo-500/20 text-indigo-400 text-xs rounded flex items-center gap-1">
<Moon className="w-3 h-3" />
@@ -276,6 +279,17 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
/>
</div>
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-white">Bed Cooled</p>
<p className="text-xs text-bambu-gray">Bed cooled below threshold after print</p>
</div>
<Toggle
checked={provider.on_bed_cooled ?? false}
onChange={(checked) => updateMutation.mutate({ on_bed_cooled: checked })}
/>
</div>
<div className="flex items-center justify-between">
<p className="text-sm text-white">Print Failed</p>
<Toggle