Send test notification if any cameras are enabled

This commit is contained in:
Josh Hawkins 2025-05-16 06:59:38 -05:00
parent a47da11b10
commit 913b858f0e

View File

@ -173,7 +173,12 @@ class WebPushClient(Communicator): # type: ignore[misc]
return return
self.send_alert(decoded) self.send_alert(decoded)
elif topic == "notification_test": elif topic == "notification_test":
if not self.config.notifications.enabled: if not self.config.notifications.enabled and not any(
cam.notifications.enabled for cam in self.config.cameras.values()
):
logger.debug(
"No cameras have notifications enabled, test notification not sent"
)
return return
self.send_notification_test() self.send_notification_test()