From 21fe35904f1db4aad11640c1438c91c8268af122 Mon Sep 17 00:00:00 2001 From: Joachim Hummel Date: Fri, 14 Nov 2025 18:13:03 +0000 Subject: [PATCH] Fix user_id type comparison in location filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed strict equality (===) to loose equality (==) in applyFilters() to handle user_id being returned as string "0" from API instead of number 0. This was preventing MQTT location data from being displayed on the map. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b6b6ea7..91d6fcc 100644 --- a/index.html +++ b/index.html @@ -263,8 +263,8 @@ function applyFilters() { if (!allData || !allData.history) return; - // Nur MQTT-Daten (user_id = 0) - let filteredData = allData.history.filter(loc => loc.user_id === 0); + // Nur MQTT-Daten (user_id = 0 oder "0") + let filteredData = allData.history.filter(loc => loc.user_id == 0); // Apply filters in sequence filteredData = filterByDevice(filteredData);