-
Notifications
You must be signed in to change notification settings - Fork 4
/
light.yaml
executable file
·268 lines (250 loc) · 8.76 KB
/
light.yaml
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
---
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Säädä valaistusta
style: |
--popup-max-width: 40vw;
--mdc-dialog-max-height: 90vh;
card_mod:
style:
ha-dialog$: |
@media (max-width: 450px), (max-height: 500px) {
div.mdc-dialog div.mdc-dialog__container {
--mdc-dialog-min-height: 100vh;
--mdc-dialog-min-width: 100vw;
--mdc-dialog-max-height: 100vh;
}
}
hui-vertical-stack-card:
$: |
#root {
padding: 0 1rem 0 1rem;
}
button-card {
padding: 0 20px 0 20px;
}
.text-content {
text-align: start !important;
}
$hui-entities-card:
$: |
ha-card {
padding: 0 20px 0 20px;
box-shadow: none;
background-color: transparent;
}
div#states.card-content {
padding: 0;
}
$button-card:
$hui-horizontal-stack-card:
$: |
#root {
display: flex;
justify-content: center;
}
$hui-vertical-stack-card:
$hui-horizontal-stack-card:
$: |
#root {
display: flex;
justify-content: center;
}
$slider-entity-row:
$hui-generic-entity-row:
$: |
div.text-content {
text-align: start;
}
content:
type: vertical-stack
cards:
- type: entities
entities:
- entity: "[[[ return entity.entity_id ]]]"
secondary_info: last-changed
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return entity.attributes.supported_features > 0 ]]]
card:
type: custom:slider-entity-row
entity: |
[[[ return entity.entity_id ]]]
name: Kirkkaus
icon: mdi:weather-sunny
styles:
card:
- height: 5rem
- overflow: visible
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return entity.attributes.supported_features > 0 ]]]
card:
type: horizontal-stack
cards:
- type: custom:button-card
template: scene_icon_temperature
entity: "[[[ return entity.entity_id ]]]"
name: Relax
variables:
color_rgb: 255, 148, 43
color_temperature: 2800
brightness: 60
- type: custom:button-card
template: scene_icon_temperature
entity: "[[[ return entity.entity_id ]]]"
name: Luku
variables:
color_rgb: 255, 174, 103
color_temperature: 3500
brightness: 100
- type: custom:button-card
template: scene_icon_temperature
entity: "[[[ return entity.entity_id ]]]"
name: Keskity
variables:
color_rgb: 255, 214, 181
color_temperature: 4200
brightness: 100
- type: custom:button-card
template: scene_icon_temperature
entity: "[[[ return entity.entity_id ]]]"
name: Viileä
variables:
color_rgb: 255, 252, 247
color_temperature: 6000
brightness: 100
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return entity.attributes.supported_features > 0 ]]]
card:
type: horizontal-stack
cards:
- type: custom:button-card
template: scene_icon_brightness
entity: "[[[ return entity.entity_id ]]]"
name: 80%
variables:
brightness: 80
- type: custom:button-card
template: scene_icon_brightness
entity: "[[[ return entity.entity_id ]]]"
name: 60%
variables:
brightness: 60
- type: custom:button-card
template: scene_icon_brightness
entity: "[[[ return entity.entity_id ]]]"
name: 40%
variables:
brightness: 40
- type: custom:button-card
template: scene_icon_brightness
entity: "[[[ return entity.entity_id ]]]"
name: 20%
variables:
brightness: 20
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return entity.attributes.supported_features > 0 && variables.popup_show_predefined_colors ]]]
card:
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
template: scene_icon_rgb
entity: "[[[ return entity.entity_id ]]]"
name: Red
variables:
color_rgb: 255, 0, 0
brightness: 100
- type: custom:button-card
template: scene_icon_rgb
entity: "[[[ return entity.entity_id ]]]"
name: Green
variables:
color_rgb: 0, 255, 0
brightness: 100
- type: custom:button-card
template: scene_icon_rgb
entity: "[[[ return entity.entity_id ]]]"
name: Blue
variables:
color_rgb: 0, 0, 255
brightness: 100
- type: custom:button-card
template: scene_icon_rgb
entity: "[[[ return entity.entity_id ]]]"
name: Yellow
variables:
color_rgb: 255, 255, 0
brightness: 100
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return variables.popup_show_colorwheel ]]]
card:
type: custom:light-entity-card
card_mod:
style: |
ha-card {
box-shadow: none;
background-color: transparent;
margin-bottom: 1rem;
}
.light-entity-card__header {
padding: 0 20px 0 20px;
}
.light-entity-card-sliders {
padding: 0 20px 0 20px;
}
entity: "[[[ return entity.entity_id ]]]"
brightness: false
color_temp: false
white_value: false
full_width_sliders: true
hide_header: true
show_slider_percent: false
smooth_color_wheel: true
persist_features: true
consolidate_entities: true
child_card: true
effects_list: false
- type: custom:button-card
template: conditional
variables:
show: |
[[[ return Boolean(entity.attributes.entity_id) ]]]
card:
type: vertical-stack
cards: |
[[[
const cards = []
const ids = [].concat(entity.attributes.entity_id)
for (let i = 0; i < ids.length; i++) {
cards.push({
"type": "tile",
"entity": ids[i],
"features": [
{ type: "light-brightness" },
],
"card_mod": {
"class": "swiper-no-swiping",
"style": "ha-card { margin-bottom: 1rem; text-align: start }",
},
});
}
return cards;
]]]