Fix Bluetooth event type being overwritten by device type

The bt_device event was including 'type': device.get('type') which
overwrote the SSE event type 'bt_device' with 'ble', causing the
frontend to not recognize the events.

- Rename device type field from 'type' to 'device_type' in bt_device events
- Update frontend to use device_type for display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-14 14:20:41 +00:00
parent 364600e545
commit b15b5ad9ba
2 changed files with 2 additions and 2 deletions

View File

@@ -1143,7 +1143,7 @@ def _run_sweep(
_emit_event('bt_device', {
'mac': mac,
'name': device.get('name', 'Unknown'),
'type': device.get('type', ''),
'device_type': device.get('type', ''),
'rssi': device.get('rssi', ''),
'is_threat': is_threat,
'is_new': not classification.get('in_baseline', False),