Skip to content

Commit 38aecc8

Browse files
authored
Update fast-search-card.js
1 parent b918c97 commit 38aecc8

File tree

1 file changed

+46
-14
lines changed

1 file changed

+46
-14
lines changed

dist/fast-search-card.js

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8471,30 +8471,34 @@ class FastSearchCard extends HTMLElement {
84718471

84728472
getCoverTimerPresets() {
84738473
return `
8474-
<button class="timer-control-preset" data-action="open_cover" title="Öffnen">
8475-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8474+
<button class="timer-control-preset" data-action="open" title="Öffnen">
8475+
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
84768476
<path d="M18 15l-6-6-6 6"/>
84778477
</svg>
84788478
<span class="timer-preset-label">Öffnen</span>
84798479
</button>
8480-
<button class="timer-control-preset" data-action="close_cover" title="Schließen">
8481-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8480+
8481+
<button class="timer-control-preset" data-action="close" title="Schließen">
8482+
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
84828483
<path d="M6 9l6 6 6-6"/>
84838484
</svg>
84848485
<span class="timer-preset-label">Schließen</span>
84858486
</button>
8486-
<button class="timer-control-preset" data-action="stop_cover" title="Stoppen">
8487-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8488-
<rect x="6" y="6" width="12" height="12"/>
8487+
8488+
<button class="timer-control-preset" data-action="set_position_25" title="25% öffnen">
8489+
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
8490+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
8491+
<path d="M3 12h6"/>
84898492
</svg>
8490-
<span class="timer-preset-label">Stop</span>
8493+
<span class="timer-preset-label">25%</span>
84918494
</button>
8492-
<button class="timer-control-preset" data-action="set_position_50" title="50% Position">
8493-
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
8495+
8496+
<button class="timer-control-preset" data-action="set_position_75" title="75% öffnen">
8497+
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
84948498
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
8495-
<line x1="3" y1="12" x2="21" y2="12"/>
8499+
<path d="M3 12h15"/>
84968500
</svg>
8497-
<span class="timer-preset-label">50%</span>
8501+
<span class="timer-preset-label">75%</span>
84988502
</button>
84998503
`;
85008504
}
@@ -8834,12 +8838,18 @@ class FastSearchCard extends HTMLElement {
88348838
'dim_30': '🌙 Dimmen 30%',
88358839
'dim_50': '🌗 Dimmen 50%',
88368840

8837-
// Climate - Ihre 5 gewünschten Funktionen
8841+
// Climate
88388842
'heat_24': '🔥 Heizen 24°C',
88398843
'cool_22': '❄️ Kühlen 22°C',
88408844
'dry_mode': '💧 Entfeuchten',
88418845
'fan_only': '🌀 Lüften',
88428846

8847+
// Cover - Nur 4 Aktionen
8848+
'open': '⬆️ Öffnen',
8849+
'close': '⬇️ Schließen',
8850+
'set_position_25': '📏 25% öffnen',
8851+
'set_position_75': '📏 75% öffnen',
8852+
88438853
// Generic
88448854
'toggle': '🔄 Umschalten'
88458855
};
@@ -9532,7 +9542,6 @@ class FastSearchCard extends HTMLElement {
95329542

95339543

95349544

9535-
95369545
getActionServiceData(item, action) {
95379546
const domain = item.domain;
95389547

@@ -9543,6 +9552,8 @@ class FastSearchCard extends HTMLElement {
95439552
return this.getClimateActionData(action);
95449553
case 'media_player':
95459554
return this.getMediaActionData(action);
9555+
case 'cover':
9556+
return this.getCoverActionData(action);
95469557
default:
95479558
return this.getGenericActionData(domain, action);
95489559
}
@@ -9599,6 +9610,27 @@ class FastSearchCard extends HTMLElement {
95999610
return { service: 'climate.turn_off', serviceData: {} };
96009611
}
96019612
}
9613+
9614+
getCoverActionData(action) {
9615+
switch (action) {
9616+
case 'open':
9617+
return { service: 'cover.open_cover', serviceData: {} };
9618+
case 'close':
9619+
return { service: 'cover.close_cover', serviceData: {} };
9620+
case 'set_position_25':
9621+
return {
9622+
service: 'cover.set_cover_position',
9623+
serviceData: { position: 25 }
9624+
};
9625+
case 'set_position_75':
9626+
return {
9627+
service: 'cover.set_cover_position',
9628+
serviceData: { position: 75 }
9629+
};
9630+
default:
9631+
return { service: 'cover.close_cover', serviceData: {} };
9632+
}
9633+
}
96029634

96039635
getMediaActionData(action) {
96049636
switch (action) {

0 commit comments

Comments
 (0)