Code kopieren & zu Dashboards
1# Raum-Übersicht Dashboard Card
2# Zeigt alle wichtigen Informationen eines Raumes auf einen Blick
3type: vertical-stack
4cards:
5 # Raum Header mit Name und Status
6 - type: horizontal-stack
7 cards:
8 - type: markdown
9 content: |
10 # 🏠 {{ states('input_text.room_name') or 'Wohnzimmer' }}
11 **{{ now().strftime('%H:%M') }}** | **{{ now().strftime('%d.%m.%Y') }}**
12 card_mod:
13 style: |
14 ha-card {
15 background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
16 color: white;
17 border-radius: 15px 15px 0 0;
18 padding: 10px;
19 }
20
21 # Raum-Status Indikator
22 - type: glance
23 entities:
24 - entity: binary_sensor.room_occupied
25 name: "Anwesend"
26 - entity: binary_sensor.room_window_open
27 name: "Fenster"
28 - entity: switch.room_main_light
29 name: "Licht"
30 columns: 3
31 card_mod:
32 style: |
33 ha-card {
34 background: rgba(255,255,255,0.1);
35 color: white;
36 border-radius: 0 15px 0 0;
37 border: none;
38 }
39
40 # Klima und Sensoren
41 - type: horizontal-stack
42 cards:
43 # Temperatur und Luftfeuchtigkeit
44 - type: vertical-stack
45 cards:
46 - type: gauge
47 entity: sensor.room_temperature
48 name: "Temperatur"
49 min: 15
50 max: 30
51 severity:
52 green: 18
53 yellow: 25
54 red: 28
55 card_mod:
56 style: |
57 ha-card {
58 border-radius: 15px;
59 background: var(--card-background-color);
60 }
61
62 - type: gauge
63 entity: sensor.room_humidity
64 name: "Luftfeuchtigkeit"
65 min: 30
66 max: 80
67 severity:
68 green: 40
69 yellow: 60
70 red: 70
71 card_mod:
72 style: |
73 ha-card {
74 border-radius: 15px;
75 background: var(--card-background-color);
76 }
77
78 # Luftqualität und weitere Sensoren
79 - type: entities
80 title: "Sensoren"
81 entities:
82 - entity: sensor.room_co2
83 name: "CO₂"
84 icon: "mdi:molecule-co2"
85 card_mod:
86 style: |
87 :host {
88 --paper-item-icon-color: >
89 {% set co2 = states('sensor.room_co2') | int %}
90 {% if co2 < 800 %}green
91 {% elif co2 < 1200 %}orange
92 {% else %}red{% endif %};
93 }
94 - entity: sensor.room_pressure
95 name: "Luftdruck"
96 icon: "mdi:gauge"
97 - entity: sensor.room_light_level
98 name: "Helligkeit"
99 icon: "mdi:brightness-6"
100 - entity: binary_sensor.room_motion
101 name: "Bewegung"
102 icon: "mdi:motion-sensor"
103 card_mod:
104 style: |
105 ha-card {
106 border-radius: 15px;
107 background: var(--card-background-color);
108 }
109
110 # Beleuchtung Steuerung
111 - type: entities
112 title: "💡 Beleuchtung"
113 entities:
114 - entity: switch.room_main_light
115 name: "Hauptlicht"
116 icon: "mdi:ceiling-light"
117 - entity: light.room_ambient_light
118 name: "Stimmungslicht"
119 icon: "mdi:lightbulb-outline"
120 - entity: light.room_desk_light
121 name: "Schreibtischlicht"
122 icon: "mdi:desk-lamp"
123 - entity: input_number.room_brightness
124 name: "Helligkeit"
125 icon: "mdi:brightness-percent"
126 card_mod:
127 style: |
128 ha-card {
129 border-radius: 15px;
130 background: var(--card-background-color);
131 }
132
133 # Geräte und Steuerung
134 - type: horizontal-stack
135 cards:
136 # Heizung/Klima
137 - type: thermostat
138 entity: climate.room_heating
139 name: "Heizung"
140 card_mod:
141 style: |
142 ha-card {
143 border-radius: 15px;
144 background: var(--card-background-color);
145 }
146
147 # Weitere Geräte
148 - type: entities
149 title: "🔌 Geräte"
150 entities:
151 - entity: switch.room_tv
152 name: "Fernseher"
153 icon: "mdi:television"
154 - entity: switch.room_sound_system
155 name: "Musikanlage"
156 icon: "mdi:speaker"
157 - entity: cover.room_blinds
158 name: "Jalousien"
159 icon: "mdi:blinds"
160 - entity: fan.room_ceiling_fan
161 name: "Ventilator"
162 icon: "mdi:fan"
163 card_mod:
164 style: |
165 ha-card {
166 border-radius: 15px;
167 background: var(--card-background-color);
168 }
169
170 # Schnellaktionen
171 - type: horizontal-stack
172 cards:
173 - type: button
174 name: "Alles Aus"
175 icon: "mdi:power-off"
176 tap_action:
177 action: call-service
178 service: script.room_all_off
179 card_mod:
180 style: |
181 ha-card {
182 background: linear-gradient(45deg, #f44336, #d32f2f);
183 color: white;
184 border-radius: 15px;
185 }
186
187 - type: button
188 name: "Entspannung"
189 icon: "mdi:sofa"
190 tap_action:
191 action: call-service
192 service: script.room_relaxation_mode
193 card_mod:
194 style: |
195 ha-card {
196 background: linear-gradient(45deg, #4caf50, #388e3c);
197 color: white;
198 border-radius: 15px;
199 }
200
201 - type: button
202 name: "Arbeiten"
203 icon: "mdi:desk"
204 tap_action:
205 action: call-service
206 service: script.room_work_mode
207 card_mod:
208 style: |
209 ha-card {
210 background: linear-gradient(45deg, #2196f3, #1976d2);
211 color: white;
212 border-radius: 15px;
213 }
214
215 - type: button
216 name: "Schlafen"
217 icon: "mdi:sleep"
218 tap_action:
219 action: call-service
220 service: script.room_sleep_mode
221 card_mod:
222 style: |
223 ha-card {
224 background: linear-gradient(45deg, #9c27b0, #7b1fa2);
225 color: white;
226 border-radius: 15px;
227 }