Fix case mismatch in PersonAlert camera lookup

cameraName from MQTT was compared against lowercased frigateCamera
without being lowercased itself — Front_Porch !== front_porch.
This commit is contained in:
root
2026-04-16 22:07:22 -05:00
parent 3b38a78295
commit f5461db97d

View File

@@ -23,8 +23,9 @@ import { env } from '@/config/environment';
// Person detection alert overlay - shows for 30 seconds when person detected on any configured camera // Person detection alert overlay - shows for 30 seconds when person detected on any configured camera
function PersonAlert({ cameraName, onClose }: { cameraName: string; onClose: () => void }) { function PersonAlert({ cameraName, onClose }: { cameraName: string; onClose: () => void }) {
const cameras = useSettingsStore((state) => state.config.cameras); const cameras = useSettingsStore((state) => state.config.cameras);
const cameraLower = cameraName.toLowerCase();
const camera = cameras.find( const camera = cameras.find(
(c) => c.frigateCamera?.toLowerCase() === cameraName || c.name.toLowerCase() === cameraName, (c) => c.frigateCamera?.toLowerCase() === cameraLower || c.name.toLowerCase() === cameraLower,
); );
useEffect(() => { useEffect(() => {