Metainformationen zur Seite
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
| home_assistant:home_assistant_grundlagen_stundenplan [01.10.2025] – alte Version wiederhergestellt (01.10.2025) mark | home_assistant:home_assistant_grundlagen_stundenplan [01.10.2025] (aktuell) – mark | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Stundenplan ====== | ====== Stundenplan ====== | ||
| - | |||
| - | Vorraussetzung: | ||
| - | [[https:// | ||
| - | |||
| - | Als erstes wird der Stundenplan als " | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | |||
| - | </ | ||
| - | |||
| - | Wie immer, Daei speichern und Konfiguration neu laden. | ||
| - | |||
| - | Als nächstes eine neue custom: | ||
| - | < | ||
| - | |||
| - | type: custom: | ||
| - | entity: sensor.stundenplan_paulina | ||
| - | name: Paulina | ||
| - | show_icon: false | ||
| - | show_state: false | ||
| - | custom_fields: | ||
| - | table: | | ||
| - | [[[ | ||
| - | const plan = JSON.parse(entity.attributes.stundenplan); | ||
| - | const dayNames = [" | ||
| - | const weekdays = [" | ||
| - | const today = dayNames[new Date().getDay()-1]; | ||
| - | |||
| - | let output = `<table style=" | ||
| - | |||
| - | // Header mit hellgrauem Hintergrund und zentriert | ||
| - | output += `< | ||
| - | weekdays.forEach((d, | ||
| - | const bg = (dayNames[i] === today) ? " | ||
| - | output += `<th style=" | ||
| - | }); | ||
| - | output += `</ | ||
| - | |||
| - | // Stundenplan-Zeilen | ||
| - | plan.forEach(row => { | ||
| - | output += `< | ||
| - | // Uhrzeit-Spalte hellgrau | ||
| - | output += `<td style=" | ||
| - | dayNames.forEach(d => { | ||
| - | const bg = (d === today) ? " | ||
| - | output += `<td style=" | ||
| - | }); | ||
| - | output += `</ | ||
| - | }); | ||
| - | |||
| - | output += `</ | ||
| - | return output; | ||
| - | ]]] | ||
| - | styles: | ||
| - | card: | ||
| - | - text-align: center | ||
| - | - font-weight: | ||
| - | - background: null | ||
| - | custom_fields: | ||
| - | table: | ||
| - | - position: relative | ||
| - | - width: 125% | ||
| - | - left: " | ||
| - | - top: 10px | ||
| - | |||
| - | </ | ||
| - | |||
| - | **entity: sensor.stundenplan_paulina** entsprechend verändern, muss zu in der YAML zu **- name: " | ||
| - | Evtl. mit den Werten speielen: **- width: 125%** und **- left: " | ||