Skip to content

Commit 05694ec

Browse files
author
Franz646
committed
debug: visible debug box in panel for platform matching diagnosis — v2.0.5
1 parent 00a03e7 commit 05694ec

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

custom_components/orphan_cleaner/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
PANEL_ICON = "mdi:broom"
4848

4949
# Versione corrente (usata per cache-busting)
50-
VERSION = "2.0.4"
50+
VERSION = "2.0.5"

custom_components/orphan_cleaner/frontend/panel.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
<svg viewBox="0 0 24 24"><path d="M19.36 2.72 20.78 4.14l-1.4 1.41 1.41 1.41-4.24 4.24-1.41-1.41-6.89 6.9a4 4 0 0 1-1.2 4.71l-2.83 2.12-1.41-1.41 2.12-2.83a2 2 0 0 0 .27-2.1l-.27-.42L3 15.36l1.41-1.41 1.42 1.42 5.65-5.66-1.41-1.41 4.24-4.24 1.41 1.41z"/></svg>
209209
</div>
210210
<div>
211-
<div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.0.4</span></div>
211+
<div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.0.5</span></div>
212212
<div class="topbar-sub">Home Assistant Integration — orphan entity cleanup</div>
213213
</div>
214214
<div class="topbar-spacer"></div>
@@ -286,6 +286,8 @@ <h3>Available services</h3>
286286

287287
</div>
288288

289+
<div id="debug-box" style="margin:10px 0;padding:10px 14px;background:var(--surface2);border-radius:var(--radius-sm);font-size:11px;font-family:monospace;color:var(--text2);display:none;white-space:pre-wrap;border:1px solid var(--border2);"></div>
290+
289291
<!-- Confirm modal -->
290292
<div class="overlay-wrap" id="overlay">
291293
<div class="modal">
@@ -321,9 +323,13 @@ <h2>Confirm deletion</h2>
321323
function applyIgnore() {
322324
const items = filteredOrphans();
323325
const active = items.filter(e => !e._ignored);
324-
console.log('[IgnoreDebug] ignorePlatforms:', [...ignorePlatforms]);
325-
console.log('[IgnoreDebug] sample platforms in allOrphans:', [...new Set(allOrphans.map(e=>e.platform))].slice(0,20));
326-
console.log('[IgnoreDebug] ignored count:', items.filter(e=>e._ignored).length, '/', items.length);
326+
const dbg = document.getElementById('debug-box');
327+
const platformsInData = [...new Set(allOrphans.map(e=>e.platform))].sort();
328+
dbg.style.display = 'block';
329+
dbg.textContent =
330+
'ignorePlatforms set : ' + JSON.stringify([...ignorePlatforms]) + '\n' +
331+
'platforms in data : ' + JSON.stringify(platformsInData) + '\n' +
332+
'ignored count : ' + items.filter(e=>e._ignored).length + ' / ' + items.length;
327333
// deseleziona entità che ora sono ignorate
328334
items.filter(e => e._ignored).forEach(e => selected.delete(e.entity_id));
329335
renderTable(items);

custom_components/orphan_cleaner/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "orphan_cleaner",
33
"name": "Orphan Entity Cleaner",
4-
"version": "2.0.4",
4+
"version": "2.0.5",
55
"documentation": "https://github.com/Franz646/orphan-cleaner",
66
"issue_tracker": "https://github.com/Franz646/orphan-cleaner/issues",
77
"codeowners": [

0 commit comments

Comments
 (0)