@@ -7421,6 +7421,178 @@ class FastSearchCard extends HTMLElement {
74217421 </div>
74227422 `;
74237423 }
7424+
7425+ getTimerPresetsForDevice(item) {
7426+ const domain = item.domain;
7427+
7428+ switch (domain) {
7429+ case 'light':
7430+ return this.getLightTimerPresets();
7431+ case 'climate':
7432+ return this.getClimateTimerPresets();
7433+ case 'media_player':
7434+ return this.getMediaTimerPresets();
7435+ case 'cover':
7436+ return this.getCoverTimerPresets();
7437+ case 'switch':
7438+ return this.getSwitchTimerPresets();
7439+ default:
7440+ return this.getLightTimerPresets(); // Fallback
7441+ }
7442+ }
7443+
7444+ getLightTimerPresets() {
7445+ return `
7446+ <button class="timer-control-preset" data-action="turn_off" title="Ausschalten">
7447+ <svg width="24px" height="24px" stroke-width="1" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
7448+ <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" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
7449+ <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" stroke="currentColor" stroke-width="1"/>
7450+ </svg>
7451+ <span class="timer-preset-label">Aus</span>
7452+ </button>
7453+ <button class="timer-control-preset" data-action="turn_on" title="Einschalten">
7454+ <svg width="24px" height="24px" stroke-width="1" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
7455+ <path d="M17 13C17.5523 13 18 12.5523 18 12C18 11.4477 17.5523 11 17 11C16.4477 11 16 11.4477 16 12C16 12.5523 16.4477 13 17 13Z" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
7456+ <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" stroke="currentColor" stroke-width="1"/>
7457+ </svg>
7458+ <span class="timer-preset-label">Ein</span>
7459+ </button>
7460+ <button class="timer-control-preset" data-action="dim_30" title="30% Helligkeit">
7461+ <svg width="24px" height="24px" stroke-width="1" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
7462+ <path d="M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
7463+ </svg>
7464+ <span class="timer-preset-label">30%</span>
7465+ </button>
7466+ <button class="timer-control-preset" data-action="dim_50" title="50% Helligkeit">
7467+ <svg width="24px" height="24px" stroke-width="1" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
7468+ <path d="M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18Z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
7469+ </svg>
7470+ <span class="timer-preset-label">50%</span>
7471+ </button>
7472+ `;
7473+ }
7474+
7475+ getClimateTimerPresets() {
7476+ return `
7477+ <button class="timer-control-preset" data-action="turn_off" title="Ausschalten">
7478+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7479+ <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"/>
7480+ <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"/>
7481+ </svg>
7482+ <span class="timer-preset-label">Aus</span>
7483+ </button>
7484+ <button class="timer-control-preset" data-action="heat_22" title="Heizen 22°C">
7485+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7486+ <path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"/>
7487+ </svg>
7488+ <span class="timer-preset-label">22°C</span>
7489+ </button>
7490+ <button class="timer-control-preset" data-action="cool_18" title="Kühlen 18°C">
7491+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7492+ <path d="M2 12h20M12 2v20m8-8l-8-8-8 8"/>
7493+ </svg>
7494+ <span class="timer-preset-label">18°C</span>
7495+ </button>
7496+ <button class="timer-control-preset" data-action="auto_mode" title="Auto Modus">
7497+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7498+ <circle cx="12" cy="12" r="10"/>
7499+ <path d="M12 6v6l4 2"/>
7500+ </svg>
7501+ <span class="timer-preset-label">Auto</span>
7502+ </button>
7503+ `;
7504+ }
7505+
7506+ getMediaTimerPresets() {
7507+ return `
7508+ <button class="timer-control-preset" data-action="turn_off" title="Ausschalten">
7509+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7510+ <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"/>
7511+ <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"/>
7512+ </svg>
7513+ <span class="timer-preset-label">Aus</span>
7514+ </button>
7515+ <button class="timer-control-preset" data-action="play" title="Abspielen">
7516+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7517+ <polygon points="5,3 19,12 5,21"/>
7518+ </svg>
7519+ <span class="timer-preset-label">Play</span>
7520+ </button>
7521+ <button class="timer-control-preset" data-action="pause" title="Pausieren">
7522+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7523+ <rect x="6" y="4" width="4" height="16"/>
7524+ <rect x="14" y="4" width="4" height="16"/>
7525+ </svg>
7526+ <span class="timer-preset-label">Pause</span>
7527+ </button>
7528+ <button class="timer-control-preset" data-action="volume_down" title="Leiser">
7529+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7530+ <polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
7531+ <line x1="23" y1="9" x2="17" y2="15"/>
7532+ <line x1="17" y1="9" x2="23" y2="15"/>
7533+ </svg>
7534+ <span class="timer-preset-label">Leiser</span>
7535+ </button>
7536+ `;
7537+ }
7538+
7539+ getCoverTimerPresets() {
7540+ return `
7541+ <button class="timer-control-preset" data-action="open_cover" title="Öffnen">
7542+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7543+ <path d="M18 15l-6-6-6 6"/>
7544+ </svg>
7545+ <span class="timer-preset-label">Öffnen</span>
7546+ </button>
7547+ <button class="timer-control-preset" data-action="close_cover" title="Schließen">
7548+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7549+ <path d="M6 9l6 6 6-6"/>
7550+ </svg>
7551+ <span class="timer-preset-label">Schließen</span>
7552+ </button>
7553+ <button class="timer-control-preset" data-action="stop_cover" title="Stoppen">
7554+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7555+ <rect x="6" y="6" width="12" height="12"/>
7556+ </svg>
7557+ <span class="timer-preset-label">Stop</span>
7558+ </button>
7559+ <button class="timer-control-preset" data-action="set_position_50" title="50% Position">
7560+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7561+ <rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
7562+ <line x1="3" y1="12" x2="21" y2="12"/>
7563+ </svg>
7564+ <span class="timer-preset-label">50%</span>
7565+ </button>
7566+ `;
7567+ }
7568+
7569+ getSwitchTimerPresets() {
7570+ return `
7571+ <button class="timer-control-preset" data-action="turn_off" title="Ausschalten">
7572+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7573+ <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"/>
7574+ <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"/>
7575+ </svg>
7576+ <span class="timer-preset-label">Aus</span>
7577+ </button>
7578+ <button class="timer-control-preset" data-action="turn_on" title="Einschalten">
7579+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
7580+ <path d="M17 13C17.5523 13 18 12.5523 18 12C18 11.4477 17.5523 11 17 11C16.4477 11 16 11.4477 16 12C16 12.5523 16.4477 13 17 13Z"/>
7581+ <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"/>
7582+ </svg>
7583+ <span class="timer-preset-label">Ein</span>
7584+ </button>
7585+ `;
7586+ }
7587+
7588+
7589+
7590+
7591+
7592+
7593+
7594+
7595+
74247596
74257597 // Placeholder Methoden (erstmal mit Dummy-Daten)
74267598 getDeviceTimers(deviceId) {
0 commit comments