@@ -10103,12 +10103,10 @@ class FastSearchCard extends HTMLElement {
1010310103 getPresetIconForAction(action) {
1010410104 console.log('🔍 DEBUG - Action eingegangen:', action);
1010510105
10106- // Bestimme welche Preset-Funktion und welche Action
1010710106 let presetHTML = '';
1010810107
1010910108 if (action.includes('Einschalten') || action.includes('Ein')) {
10110- presetHTML = this.getLightTimerPresets(); // Hole komplettes HTML
10111- // Extrahiere SVG aus turn_on Button
10109+ presetHTML = this.getLightTimerPresets();
1011210110 const match = presetHTML.match(/data-action="turn_on"[^>]*>(.*?)<span class="timer-preset-label">/s);
1011310111 if (match) {
1011410112 const svgMatch = match[1].match(/<svg[^>]*>.*?<\/svg>/s);
@@ -10121,37 +10119,23 @@ class FastSearchCard extends HTMLElement {
1012110119 const svgMatch = match[1].match(/<svg[^>]*>.*?<\/svg>/s);
1012210120 return svgMatch ? svgMatch[0].replace('width="24"', 'width="16"').replace('height="24"', 'height="16"') : '';
1012310121 }
10124- } else if (action.includes('30%')) {
10122+ } else if (action.includes('🌙') || action.includes('Dimmen 30%')) { // ← GEÄNDERT!
1012510123 console.log('🔍 30% gefunden!');
1012610124 presetHTML = this.getLightTimerPresets();
10127- console.log('🔍 PresetHTML Länge:', presetHTML.length);
10128- console.log('🔍 PresetHTML enthält dim_30:', presetHTML.includes('data-action="dim_30"'));
10129-
1013010125 const match = presetHTML.match(/data-action="dim_30"[^>]*>\s*(.*?)\s*<span class="timer-preset-label">/s);
10131- console.log('🔍 Match gefunden:', !!match);
1013210126 if (match) {
10133- console.log('🔍 Match[1]:', match[1]);
1013410127 const svgMatch = match[1].match(/<svg[^>]*>.*?<\/svg>/s);
10135- console.log('🔍 SVG Match:', !!svgMatch);
1013610128 if (svgMatch) {
10137- console.log('🔍 SVG:', svgMatch[0]);
1013810129 return svgMatch[0].replace('width="24"', 'width="16"').replace('height="24"', 'height="16"');
1013910130 }
1014010131 }
10141- } else if (action.includes('50%')) {
10132+ } else if (action.includes('🌗') || action.includes('Dimmen 50%')) { // ← GEÄNDERT!
1014210133 console.log('🔍 50% gefunden!');
1014310134 presetHTML = this.getLightTimerPresets();
10144- console.log('🔍 PresetHTML Länge:', presetHTML.length);
10145- console.log('🔍 PresetHTML enthält dim_50:', presetHTML.includes('data-action="dim_50"'));
10146-
1014710135 const match = presetHTML.match(/data-action="dim_50"[^>]*>\s*(.*?)\s*<span class="timer-preset-label">/s);
10148- console.log('🔍 Match gefunden:', !!match);
1014910136 if (match) {
10150- console.log('🔍 Match[1]:', match[1]);
1015110137 const svgMatch = match[1].match(/<svg[^>]*>.*?<\/svg>/s);
10152- console.log('🔍 SVG Match:', !!svgMatch);
1015310138 if (svgMatch) {
10154- console.log('🔍 SVG:', svgMatch[0]);
1015510139 return svgMatch[0].replace('width="24"', 'width="16"').replace('height="24"', 'height="16"');
1015610140 }
1015710141 }
0 commit comments