@@ -11248,9 +11248,50 @@ class FastSearchCard extends HTMLElement {
1124811248 this.renderActionResults(relatedActions, resultsDiv, filter);
1124911249
1125011250 }
11251+
11252+ // 🔍 DEBUG: Verfügbare Metadaten analysieren
11253+ debugAvailableMetadata(entityId) {
11254+ const state = this._hass.states[entityId];
11255+ const entityRegistry = this._hass.entities ? this._hass.entities[entityId] : null;
11256+ const deviceId = entityRegistry?.device_id;
11257+ const device = deviceId && this._hass.devices ? this._hass.devices[deviceId] : null;
11258+
11259+ console.log(`🔍 Entity: ${entityId}`);
11260+ console.log(`🔍 State:`, state);
11261+ console.log(`🔍 Entity Registry:`, entityRegistry);
11262+ console.log(`🔍 Device ID:`, deviceId);
11263+ console.log(`🔍 Device:`, device);
11264+ console.log(`🔍 Available in _hass:`, {
11265+ entities: !!this._hass.entities,
11266+ devices: !!this._hass.devices,
11267+ areas: !!this._hass.areas,
11268+ labels: !!this._hass.labels
11269+ });
11270+
11271+ // Prüfe was bei Szenen/Skripten verfügbar ist
11272+ const sceneExample = Object.keys(this._hass.states).find(id => id.startsWith('scene.'));
11273+ const scriptExample = Object.keys(this._hass.states).find(id => id.startsWith('script.'));
11274+
11275+ if (sceneExample) {
11276+ const sceneState = this._hass.states[sceneExample];
11277+ console.log(`🎬 Scene example (${sceneExample}):`, sceneState);
11278+ console.log(`🎬 Scene attributes:`, sceneState.attributes);
11279+ }
11280+
11281+ if (scriptExample) {
11282+ const scriptState = this._hass.states[scriptExample];
11283+ console.log(`📜 Script example (${scriptExample}):`, scriptState);
11284+ console.log(`📜 Script attributes:`, scriptState.attributes);
11285+ }
11286+ }
1125111287
1125211288 // 🎯 LOAD RELATED ACTIONS - Echte Discovery
1125311289 loadRelatedActions(item, container) {
11290+
11291+ // Am Anfang hinzufügen:
11292+ console.log(`🔍 Debugging metadata for: ${item.id}`);
11293+ this.debugAvailableMetadata(item.id);
11294+
1125411295 console.log(`🔍 Loading actions for device: ${item.name} in area: ${item.area}`);
1125511296
1125611297 const deviceArea = item.area;
0 commit comments