feat: v2 event_count for Light/Door/Move/Reed; unified naming

This commit is contained in:
2026-07-03 18:17:48 +02:00
parent d432d9607e
commit 035d4fed26
3 changed files with 7 additions and 13 deletions
+2 -4
View File
@@ -125,8 +125,6 @@ function summaryLine(d) {
if ('vibration_status' in d) p.push(`vibration: ${d.vibration_status}`);
if ('magnet_status' in d) p.push(`magnet: ${d.magnet_status}`);
if ('event_count' in d && d.mode_id > 2) p.push(`${d.event_count} events`);
if ('move_events' in d) p.push(`${d.move_events} moves`);
if ('reed_events' in d) p.push(`${d.reed_events} reed events`);
if ('fw_major' in d) p.push(`fw ${d.fw_major}.${d.fw_minor}`);
if (p.length === 0) p.push('heartbeat');
return p.join(' · ');
@@ -220,7 +218,7 @@ const chartPresets = {
Move: {
subtitle: 'Cumulative movement events',
datasets: (msgs) => [
makeDs('Move events', msgs.map(m => m.decoded?.move_events ?? null), '#e11d48', 'y'),
makeDs('Event count', msgs.map(m => m.decoded?.event_count ?? null), '#e11d48', 'y'),
],
},
Magnet: {
@@ -232,7 +230,7 @@ const chartPresets = {
'Reed Switch': {
subtitle: 'Cumulative reed switch events',
datasets: (msgs) => [
makeDs('Reed events', msgs.map(m => m.decoded?.reed_events ?? null), '#7c3aed', 'y'),
makeDs('Event count', msgs.map(m => m.decoded?.event_count ?? null), '#7c3aed', 'y'),
],
},
};