Skip to content

Commit f58e83f

Browse files
gbroecklingclaude
andcommitted
fix: show Private BLE friendly name instead of MAC on map/follow/devices
Private BLE devices (iPhones, Apple Watches) now display their resolved name (e.g. "Adam's iPhone") via the private_ble_name field instead of the raw rotating MAC address. Applies to all label chains in overview (2D map, 3D ISO, room chips, tooltips), follow view, and devices list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2ec2ddb commit f58e83f

6 files changed

Lines changed: 17 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to PadSpan HA are documented here.
44

55
---
66

7+
## 0.17.3 — Bug Fix (2026-03-24)
8+
9+
### Fixed
10+
- **Private BLE devices show friendly name instead of MAC** — map, follow, and devices views now use the resolved `private_ble_name` (e.g., "Adam's iPhone") when no user label is set, instead of displaying the raw rotating MAC address. Affects overview (2D, 3D, room chips, ISO stack), follow view, and devices list.
11+
12+
---
13+
714
## 0.17.2 — Bug Fix (2026-03-24)
815

916
### Fixed

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
padspanHA package version: 0.17.2
1+
padspanHA package version: 0.17.3

custom_components/padspan_ha/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"issue_tracker": "https://github.com/gbroeckling/padspanHA/issues",
2121
"requirements": [],
2222
"single_config_entry": true,
23-
"version": "0.17.2"
23+
"version": "0.17.3"
2424
}

custom_components/padspan_ha/www/padspan-ha/views/devices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function render(ctx) {
4949
id: stableId,
5050
padspan_id: o.padspan_id || "",
5151
type: o.kind,
52-
name: o.user_label || o.name || o.address || "Unknown",
52+
name: o.user_label || o.private_ble_name || o.name || o.address || "Unknown",
5353
room: o.room || "",
5454
stateRaw: o.room || (o.age_s != null ? `seen ${Math.round(o.age_s)}s ago` : ""),
5555
missing: false,

custom_components/padspan_ha/www/padspan-ha/views/follow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function _buildSelector(ctx, el, helpBtn, allObjects, currentAddr, isBasic) {
124124
if (!id) continue;
125125
if (_isScanner(o)) continue;
126126
if (_quietMode && !o.user_label && !o.identified && !ctx.actions.followedHas(id)) continue;
127-
const name = o.user_label || o.name || o.entity_id || id;
127+
const name = o.user_label || o.private_ble_name || o.name || o.entity_id || id;
128128
const room = o.room ? ` · ${o.room}` : "";
129129
const rssiStr = o.rssi != null ? ` (${o.rssi} dBm)` : "";
130130
const kind = o.kind === "entity" ? "[Entity]" : (o.identified ? "[Tagged]" : "[Unidentified]");

custom_components/padspan_ha/www/padspan-ha/views/overview.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ export function render(ctx){
885885
continue;
886886
}
887887

888-
const lbl = (o.user_label || o.name || "").substring(0, 14);
888+
const lbl = (o.user_label || o.private_ble_name || o.name || "").substring(0, 14);
889889
const _oKey = _esc(o.key || o.address || o.entity_id || "");
890890

891891
if (isFollowed) {
@@ -1802,7 +1802,7 @@ export function render(ctx){
18021802
// ── Helper: build tooltip string for any object ────────────────────────
18031803
const _objTip = (o) => {
18041804
const parts = [];
1805-
const n = o.user_label || o.name || o.address || o.entity_id || "Unknown";
1805+
const n = o.user_label || o.private_ble_name || o.name || o.address || o.entity_id || "Unknown";
18061806
parts.push(n);
18071807
if(o.kind) parts.push(`Kind: ${o.kind}`);
18081808
if(o.address && o.address !== n) parts.push(`Addr: ${o.address}`);
@@ -1834,7 +1834,7 @@ export function render(ctx){
18341834
const isGhost = o._ghost || o._stale;
18351835
const ageS = typeof o.age_s === "number" ? o.age_s : 0;
18361836
const isAway = isGhost && (o.rssi == null) && (ageS > _awayTimeoutS2);
1837-
const lbl = (o.user_label||o.name||"?").substring(0,14);
1837+
const lbl = (o.user_label||o.private_ble_name||o.name||"?").substring(0,14);
18381838
let bx, by;
18391839
let posConf = 0; // confidence for dashed circle
18401840

@@ -1948,7 +1948,7 @@ export function render(ctx){
19481948
const _awayThresh = ((ctx.state.settings && ctx.state.settings.away_timeout_m != null)
19491949
? Number(ctx.state.settings.away_timeout_m) : 5) * 60;
19501950
const isAway = typeof obj.age_s === "number" && obj.age_s > _awayThresh;
1951-
const objLabel = obj.user_label || obj.name || "";
1951+
const objLabel = obj.user_label || obj.private_ble_name || obj.name || "";
19521952

19531953
// Position: server k-NN first, then high-confidence fingerprint, then room centroid + stagger
19541954
let px, py;
@@ -2224,7 +2224,7 @@ export function render(ctx){
22242224
for(const o of (rr.objects||[]).slice(0,6)){
22252225
const oKey = o.address || o.entity_id || "";
22262226
const isF = ctx.actions.followedHas(oKey);
2227-
const lbl = (o.user_label || o.name || o.address || "?").substring(0,16);
2227+
const lbl = (o.user_label || o.private_ble_name || o.name || o.address || "?").substring(0,16);
22282228
const oc = isF ? "#fbbf24" : (o.identified ? "#5eead488" : "#f59e0b88");
22292229
const chip = el("span",{style:`font-size:10px;padding:1px 5px;border-radius:3px;background:${oc}22;color:${isF?"#fbbf24":"#94a3b8"};border:1px solid ${oc};white-space:nowrap${isF?";font-weight:700":""}`}, isF ? lbl + " \u25C9" : lbl);
22302230
objChips.appendChild(chip);
@@ -2678,7 +2678,7 @@ export function render(ctx){
26782678
const ox = x + BW - 16 - oi * 28, oy = y + 100;
26792679
const oc = o.identified ? "#5eead4" : "#f59e0b";
26802680
s += `<circle cx="${ox}" cy="${oy}" r="7" fill="${oc}" opacity="0.9"/>`;
2681-
const lbl = (o.user_label || o.name || "?").substring(0, 6);
2681+
const lbl = (o.user_label || o.private_ble_name || o.name || "?").substring(0, 6);
26822682
s += `<text x="${ox}" y="${oy + 18}" text-anchor="middle" fill="${oc}" font-size="9">${_esc(lbl)}</text>`;
26832683
});
26842684

0 commit comments

Comments
 (0)