Skip to content

Commit 5823aab

Browse files
authored
Update fast-search-card.js
1 parent eb55b2e commit 5823aab

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

dist/fast-search-card.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9531,17 +9531,22 @@ class FastSearchCard extends HTMLElement {
95319531
}
95329532

95339533
getLightActionData(action) {
9534-
switch (action) {
9535-
case 'turn_on':
9536-
return { service: 'light.turn_on', serviceData: {} };
9537-
case 'turn_off':
9538-
return { service: 'light.turn_off', serviceData: {} };
9539-
case 'dim_30':
9540-
return { service: 'light.turn_on', serviceData: { brightness_pct: 30 } };
9541-
case 'dim_50':
9542-
return { service: 'light.turn_on', serviceData: { brightness_pct: 50 } };
9543-
default:
9544-
return { service: 'light.turn_off', serviceData: {} };
9534+
// Debug: Was kommt rein?
9535+
console.log('🔧 getLightActionData - Action:', action);
9536+
9537+
if (action === 'turn_on' || action.includes('Einschalten')) {
9538+
return { service: 'light.turn_on', serviceData: {} };
9539+
} else if (action === 'turn_off' || action.includes('Ausschalten')) {
9540+
return { service: 'light.turn_off', serviceData: {} };
9541+
} else if (action === 'dim_30' || action.includes('🌙') || action.includes('Dimmen 30%')) {
9542+
console.log('🔧 30% Helligkeit erkannt!');
9543+
return { service: 'light.turn_on', serviceData: { brightness_pct: 30 } };
9544+
} else if (action === 'dim_50' || action.includes('🌗') || action.includes('Dimmen 50%')) {
9545+
console.log('🔧 50% Helligkeit erkannt!');
9546+
return { service: 'light.turn_on', serviceData: { brightness_pct: 50 } };
9547+
} else {
9548+
console.log('🔧 Fallback: turn_off');
9549+
return { service: 'light.turn_off', serviceData: {} };
95459550
}
95469551
}
95479552

0 commit comments

Comments
 (0)