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