diff --git a/web/src/components/overlay/CreateTriggerDialog.tsx b/web/src/components/overlay/CreateTriggerDialog.tsx index bc413049d..fc6a28160 100644 --- a/web/src/components/overlay/CreateTriggerDialog.tsx +++ b/web/src/components/overlay/CreateTriggerDialog.tsx @@ -82,11 +82,11 @@ export default function CreateTriggerDialog({ const availableActions = useMemo(() => { if (!config) return []; - if (config.notifications.enabled) { + if (config.cameras[selectedCamera].notifications.enabled_in_config) { return ["notification", "sub_label", "attribute"]; } return ["sub_label", "attribute"]; - }, [config]); + }, [config, selectedCamera]); const existingTriggerNames = useMemo(() => { if ( diff --git a/web/src/components/trigger/TriggerWizardDialog.tsx b/web/src/components/trigger/TriggerWizardDialog.tsx index 976cf5f8a..f41537d6d 100644 --- a/web/src/components/trigger/TriggerWizardDialog.tsx +++ b/web/src/components/trigger/TriggerWizardDialog.tsx @@ -243,6 +243,7 @@ export default function TriggerWizardDialog({ void; onBack: () => void; isLoading?: boolean; @@ -36,6 +37,7 @@ type Step3ThresholdAndActionsProps = { export default function Step3ThresholdAndActions({ initialData, trigger, + camera, onNext, onBack, isLoading = false, @@ -46,11 +48,11 @@ export default function Step3ThresholdAndActions({ const availableActions = useMemo(() => { if (!config) return []; - if (config.notifications.enabled) { + if (config.cameras[camera].notifications.enabled_in_config) { return ["notification", "sub_label", "attribute"]; } return ["sub_label", "attribute"]; - }, [config]); + }, [config, camera]); const formSchema = z.object({ threshold: z