add alerts for smart failures

This commit is contained in:
henrygd
2025-11-30 13:52:31 -05:00
parent 41a3d9359f
commit 11edabd09f
3 changed files with 264 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ func NewAlertManager(app hubLike) *AlertManager {
func (am *AlertManager) bindEvents() {
am.hub.OnRecordAfterUpdateSuccess("alerts").BindFunc(updateHistoryOnAlertUpdate)
am.hub.OnRecordAfterDeleteSuccess("alerts").BindFunc(resolveHistoryOnAlertDelete)
am.hub.OnRecordAfterUpdateSuccess("smart_devices").BindFunc(am.handleSmartDeviceAlert)
}
// IsNotificationSilenced checks if a notification should be silenced based on configured quiet hours