Skip to content

Commit fa2b357

Browse files
author
Franz646
committed
fix: glob patterns now match against platform name too (e.g. imou_*) — v2.3.2
1 parent c82f22e commit fa2b357

4 files changed

Lines changed: 7 additions & 5 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.3.1"
50+
VERSION = "2.3.2"

custom_components/orphan_cleaner/frontend/panel.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
<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>
235235
</div>
236236
<div>
237-
<div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.3.1</span></div>
237+
<div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.3.2</span></div>
238238
<div class="topbar-sub">Home Assistant Integration — orphan entity cleanup</div>
239239
</div>
240240
<div class="topbar-spacer"></div>
@@ -272,7 +272,7 @@
272272
</div>
273273
<div class="ignore-body" id="ignore-body">
274274
<div class="ignore-hint">
275-
Supports platforms (<code>tuya</code>) and entity globs (<code>sensor.old_*</code>).
275+
Supports platforms (<code>tuya</code>), platform globs (<code>imou_*</code>) and entity globs (<code>sensor.old_*</code>).
276276
Pre-loaded on every scan. <a href="#" onclick="showGlobHelp();return false;" style="color:var(--text3);font-size:10px;">?</a>
277277
</div>
278278
<div class="ignore-input-row">

custom_components/orphan_cleaner/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"iot_class": "local_push",
1414
"issue_tracker": "https://github.com/Franz646/orphan-cleaner/issues",
1515
"requirements": [],
16-
"version": "2.3.1"
16+
"version": "2.3.2"
1717
}

custom_components/orphan_cleaner/orphan_detector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def _is_ignored(entity_id: str, platform: str) -> bool:
6767
if platform and platform in _ignore:
6868
return True
6969
for pattern in _globs:
70-
if fnmatch.fnmatch(entity_id, pattern) or platform == pattern:
70+
if (fnmatch.fnmatch(entity_id, pattern)
71+
or fnmatch.fnmatch(platform, pattern)
72+
or platform == pattern):
7173
return True
7274
return False
7375

0 commit comments

Comments
 (0)