Skip to content

Commit 01d324e

Browse files
authored
Update fast-search-card.js
1 parent 0401a45 commit 01d324e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

dist/fast-search-card.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10206,17 +10206,22 @@ class FastSearchCard extends HTMLElement {
1020610206

1020710207
// Climate Actions
1020810208
} else if (action.includes('24°C') || action.includes('Heizen')) {
10209-
presetHTML = this.getClimateTimerPresets();
10210-
match = presetHTML.match(/data-action="heat_24"[^>]*>(.*?)<\/button>/s);
10209+
// Direkt das SVG holen ohne über getClimateTimerPresets zu gehen
10210+
return this.getHvacModeSVG('heat', this.currentItem)
10211+
.replace(/width="[^"]*"/g, 'width="16"')
10212+
.replace(/height="[^"]*"/g, 'height="16"');
1021110213
} else if (action.includes('22°C') || action.includes('Kühlen')) {
10212-
presetHTML = this.getClimateTimerPresets();
10213-
match = presetHTML.match(/data-action="cool_22"[^>]*>(.*?)<\/button>/s);
10214+
return this.getHvacModeSVG('cool', this.currentItem)
10215+
.replace(/width="[^"]*"/g, 'width="16"')
10216+
.replace(/height="[^"]*"/g, 'height="16"');
1021410217
} else if (action.includes('Entfeuchten')) {
10215-
presetHTML = this.getClimateTimerPresets();
10216-
match = presetHTML.match(/data-action="dry_mode"[^>]*>(.*?)<\/button>/s);
10218+
return this.getHvacModeSVG('dry', this.currentItem)
10219+
.replace(/width="[^"]*"/g, 'width="16"')
10220+
.replace(/height="[^"]*"/g, 'height="16"');
1021710221
} else if (action.includes('Lüften')) {
10218-
presetHTML = this.getClimateTimerPresets();
10219-
match = presetHTML.match(/data-action="fan_only"[^>]*>(.*?)<\/button>/s);
10222+
return this.getHvacModeSVG('fan_only', this.currentItem)
10223+
.replace(/width="[^"]*"/g, 'width="16"')
10224+
.replace(/height="[^"]*"/g, 'height="16"');
1022010225

1022110226
// Cover Actions
1022210227
} else if (action.includes('Öffnen')) {

0 commit comments

Comments
 (0)