Skip to content

Commit 5815a0f

Browse files
authored
Update fast-search-card.js
1 parent b0bd71e commit 5815a0f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

dist/fast-search-card.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5747,14 +5747,12 @@ class FastSearchCard extends HTMLElement {
57475747

57485748
async getScriptArea(entityId, state) {
57495749
try {
5750-
console.log(`🔍 Analyzing script area for: ${entityId}`);
57515750

57525751
// METHODE 1: Prüfe ob Skript explizit einer Area zugeordnet ist (Entity Registry)
57535752
if (this._hass.areas && this._hass.entities && this._hass.entities[entityId]) {
57545753
const entityRegistry = this._hass.entities[entityId];
57555754
if (entityRegistry.area_id && this._hass.areas[entityRegistry.area_id]) {
57565755
const area = this._hass.areas[entityRegistry.area_id];
5757-
console.log(`✅ Script has explicit area: ${area.name}`);
57585756
return area.name;
57595757
}
57605758
}
@@ -5763,7 +5761,6 @@ class FastSearchCard extends HTMLElement {
57635761
const scriptName = state.attributes.friendly_name || entityId;
57645762
const detectedArea = this.extractAreaFromName(scriptName);
57655763
if (detectedArea !== 'Ohne Raum') {
5766-
console.log(`✅ Script area detected from name: ${detectedArea}`);
57675764
return detectedArea;
57685765
}
57695766

@@ -5773,7 +5770,6 @@ class FastSearchCard extends HTMLElement {
57735770
if (scriptConfig) {
57745771
const configArea = this.analyzeScriptTargets(scriptConfig);
57755772
if (configArea !== 'Ohne Raum') {
5776-
console.log(`✅ Script area detected from config: ${configArea}`);
57775773
return configArea;
57785774
}
57795775
}
@@ -5890,7 +5886,6 @@ class FastSearchCard extends HTMLElement {
58905886
const entityRegistry = this._hass.entities[entityId];
58915887
if (entityRegistry.area_id && this._hass.areas[entityRegistry.area_id]) {
58925888
const area = this._hass.areas[entityRegistry.area_id];
5893-
console.log(`✅ Scene has explicit area: ${area.name}`);
58945889
return area.name;
58955890
}
58965891
}
@@ -5911,14 +5906,12 @@ class FastSearchCard extends HTMLElement {
59115906
// Wenn alle Entities in einem Raum sind
59125907
if (areas.size === 1) {
59135908
const area = [...areas][0];
5914-
console.log(`✅ Scene area detected from entities: ${area}`);
59155909
return area;
59165910
}
59175911

59185912
// METHODE 3: Area aus Namen extrahieren
59195913
const detectedArea = this.extractAreaFromName(state.attributes.friendly_name || entityId);
59205914
if (detectedArea !== 'Ohne Raum') {
5921-
console.log(`✅ Scene area detected from name: ${detectedArea}`);
59225915
return detectedArea;
59235916
}
59245917

@@ -5940,22 +5933,19 @@ class FastSearchCard extends HTMLElement {
59405933
// 🎯 AUTOMATIONS AREA-DISCOVERY (ähnlich wie Skripte)
59415934
async getAutomationArea(entityId, state) {
59425935
try {
5943-
console.log(`⚙️ Analyzing automation area for: ${entityId}`);
59445936

59455937
// METHODE 1: Explizite Area-Zuordnung
59465938
if (this._hass.areas && this._hass.entities && this._hass.entities[entityId]) {
59475939
const entityRegistry = this._hass.entities[entityId];
59485940
if (entityRegistry.area_id && this._hass.areas[entityRegistry.area_id]) {
59495941
const area = this._hass.areas[entityRegistry.area_id];
5950-
console.log(`✅ Automation has explicit area: ${area.name}`);
59515942
return area.name;
59525943
}
59535944
}
59545945

59555946
// METHODE 2: Area aus Namen extrahieren
59565947
const detectedArea = this.extractAreaFromName(state.attributes.friendly_name || entityId);
59575948
if (detectedArea !== 'Ohne Raum') {
5958-
console.log(`✅ Automation area detected from name: ${detectedArea}`);
59595949
return detectedArea;
59605950
}
59615951

0 commit comments

Comments
 (0)