Skip to content

Commit b918c97

Browse files
authored
Update fast-search-card.js
1 parent 4d1fda4 commit b918c97

File tree

1 file changed

+64
-26
lines changed

1 file changed

+64
-26
lines changed

dist/fast-search-card.js

Lines changed: 64 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8395,30 +8395,43 @@ class FastSearchCard extends HTMLElement {
83958395
getClimateTimerPresets() {
83968396
return `
83978397
<button class="timer-control-preset" data-action="turn_off" title="Ausschalten">
8398-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8399-
<path d="M7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13Z"/>
8400-
<path d="M17 17H7C4.23858 17 2 14.7614 2 12C2 9.23858 4.23858 7 7 7H17C19.7614 7 22 9.23858 22 12C22 14.7614 19.7614 17 17 17Z"/>
8398+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
8399+
<circle cx="12" cy="12" r="10"/>
8400+
<path d="m15 9-6 6"/>
8401+
<path d="m9 9 6 6"/>
84018402
</svg>
84028403
<span class="timer-preset-label">Aus</span>
84038404
</button>
8404-
<button class="timer-control-preset" data-action="heat_22" title="Heizen 22°C">
8405-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8405+
8406+
<button class="timer-control-preset" data-action="heat_24" title="Heizen auf 24°C">
8407+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
84068408
<path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"/>
8409+
<circle cx="12" cy="17" r="2"/>
8410+
</svg>
8411+
<span class="timer-preset-label">24°C</span>
8412+
</button>
8413+
8414+
<button class="timer-control-preset" data-action="cool_22" title="Kühlen auf 22°C">
8415+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
8416+
<path d="M2 6s1.5-2 5-2 5 2 5 2v14s-1.5-2-5-2-5 2-5 2V6z"/>
8417+
<path d="M7 4v16"/>
84078418
</svg>
84088419
<span class="timer-preset-label">22°C</span>
84098420
</button>
8410-
<button class="timer-control-preset" data-action="cool_18" title="Kühlen 18°C">
8411-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8412-
<path d="M2 12h20M12 2v20m8-8l-8-8-8 8"/>
8421+
8422+
<button class="timer-control-preset" data-action="dry_mode" title="Entfeuchten">
8423+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
8424+
<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"/>
8425+
<path d="M8 14s1.5 2 4 2 4-2 4-2"/>
84138426
</svg>
8414-
<span class="timer-preset-label">18°C</span>
8427+
<span class="timer-preset-label">Entfeuchten</span>
84158428
</button>
8416-
<button class="timer-control-preset" data-action="auto_mode" title="Auto Modus">
8417-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8418-
<circle cx="12" cy="12" r="10"/>
8419-
<path d="M12 6v6l4 2"/>
8429+
8430+
<button class="timer-control-preset" data-action="fan_only" title="Lüften">
8431+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
8432+
<path d="M12.5 2c-.8 0-1.5.7-1.5 1.5v6.21l-1.09-.63c-.69-.4-1.58-.16-1.98.53-.4.69-.16 1.58.53 1.98l1.09.63-1.09.63c-.69.4-.93 1.29-.53 1.98.4.69 1.29.93 1.98.53l1.09-.63v6.21c0 .8.7 1.5 1.5 1.5s1.5-.7 1.5-1.5v-6.21l1.09.63c.69.4 1.58.16 1.98-.53.4-.69.16-1.58-.53-1.98L13.5 12l1.09-.63c.69-.4.93-1.29.53-1.98-.4-.69-1.29-.93-1.98-.53L12.5 9.5V3.5c0-.8-.7-1.5-1.5-1.5z"/>
84208433
</svg>
8421-
<span class="timer-preset-label">Auto</span>
8434+
<span class="timer-preset-label">Lüften</span>
84228435
</button>
84238436
`;
84248437
}
@@ -8815,19 +8828,24 @@ class FastSearchCard extends HTMLElement {
88158828

88168829
getActionLabel(actionString) {
88178830
const actionLabels = {
8831+
// Light
88188832
'turn_off': '🔴 Ausschalten',
88198833
'turn_on': '💡 Einschalten',
88208834
'dim_30': '🌙 Dimmen 30%',
88218835
'dim_50': '🌗 Dimmen 50%',
8822-
'toggle': '🔄 Umschalten',
8823-
'light.turn_on': '💡 Einschalten',
8824-
'light.turn_off': '💡 Ausschalten',
8825-
'switch.turn_on': '🔌 Einschalten',
8826-
'switch.turn_off': '🔌 Ausschalten'
8836+
8837+
// Climate - Ihre 5 gewünschten Funktionen
8838+
'heat_24': '🔥 Heizen 24°C',
8839+
'cool_22': '❄️ Kühlen 22°C',
8840+
'dry_mode': '💧 Entfeuchten',
8841+
'fan_only': '🌀 Lüften',
8842+
8843+
// Generic
8844+
'toggle': '🔄 Umschalten'
88278845
};
88288846

88298847
return actionLabels[actionString] || actionString || 'Aktion';
8830-
}
8848+
}
88318849

88328850
closeTimeSelection(container) {
88338851
const activeTimersSection = container.querySelector('.active-timers');
@@ -9549,14 +9567,34 @@ class FastSearchCard extends HTMLElement {
95499567

95509568
getClimateActionData(action) {
95519569
switch (action) {
9552-
case 'turn_on':
9553-
return { service: 'climate.turn_on', serviceData: {} };
95549570
case 'turn_off':
95559571
return { service: 'climate.turn_off', serviceData: {} };
9556-
case 'heat_22':
9557-
return { service: 'climate.set_temperature', serviceData: { temperature: 22 } };
9558-
case 'cool_18':
9559-
return { service: 'climate.set_temperature', serviceData: { temperature: 18 } };
9572+
case 'heat_24':
9573+
return {
9574+
service: 'climate.set_temperature',
9575+
serviceData: {
9576+
hvac_mode: 'heat',
9577+
temperature: 24
9578+
}
9579+
};
9580+
case 'cool_22':
9581+
return {
9582+
service: 'climate.set_temperature',
9583+
serviceData: {
9584+
hvac_mode: 'cool',
9585+
temperature: 22
9586+
}
9587+
};
9588+
case 'dry_mode':
9589+
return {
9590+
service: 'climate.set_hvac_mode',
9591+
serviceData: { hvac_mode: 'dry' }
9592+
};
9593+
case 'fan_only':
9594+
return {
9595+
service: 'climate.set_hvac_mode',
9596+
serviceData: { hvac_mode: 'fan_only' }
9597+
};
95609598
default:
95619599
return { service: 'climate.turn_off', serviceData: {} };
95629600
}

0 commit comments

Comments
 (0)