mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
feat(notifications): dedicate AI Failure Detection notification event (#1794)
Split Obico failure-detection dispatch out of the multiplexed
on_printer_error event onto its own on_ai_failure_detection event so
users can subscribe to AI alerts without also enabling HMS hardware-
error pages, and so the discoverable label "AI Failure Detection" is
what subscribes them rather than the unrelated "Printer Error" toggle.
New column on notification_providers (default False, branched
SQLite/Postgres migration), new notification_service.on_ai_failure_detection
method, new ai_failure_detection template, obico_actions._notify swap.
Frontend gets a summary badge, a toggle row with description, and ntfy
priority surfacing. 14 new tests pin the routing + the regression guard
("Printer Error" alone must NOT receive AI notifications now). 11 locales
covered.
Existing providers keep working: HMS hardware errors continue to ride
on_printer_error unchanged; users who want spaghetti alerts opt in via
the new toggle.
This commit is contained in:
@@ -47,6 +47,7 @@ def _provider_to_dict(provider: NotificationProvider) -> dict:
|
||||
# Printer status events
|
||||
"on_printer_offline": provider.on_printer_offline,
|
||||
"on_printer_error": provider.on_printer_error,
|
||||
"on_ai_failure_detection": provider.on_ai_failure_detection,
|
||||
"on_filament_low": provider.on_filament_low,
|
||||
"on_maintenance_due": provider.on_maintenance_due,
|
||||
# AMS environmental alarms (regular AMS)
|
||||
@@ -127,6 +128,7 @@ async def create_notification_provider(
|
||||
# Printer status events
|
||||
on_printer_offline=provider_data.on_printer_offline,
|
||||
on_printer_error=provider_data.on_printer_error,
|
||||
on_ai_failure_detection=provider_data.on_ai_failure_detection,
|
||||
on_filament_low=provider_data.on_filament_low,
|
||||
on_maintenance_due=provider_data.on_maintenance_due,
|
||||
# AMS environmental alarms (regular AMS)
|
||||
|
||||
Reference in New Issue
Block a user