Skip to content

Commit f7deab4

Browse files
committed
Merge branch 'release' of https://github.com/UI-Lovelace-Minimalist/UI into release
2 parents 62eab60 + a49b298 commit f7deab4

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_scenes_welcome.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ card_scenes_welcome:
6565
- grid-template-areas: >
6666
[[[
6767
var pills = []
68-
const entities = [variables.entity_1.entity_id, variables.entity_2.entity_id, variables.entity_3.entity_id, variables.entity_4.entity_id, variables.entity_5.entity_id, variables.entity_6.entity_id, variables.entity_7.entity_id]
68+
const entities = [variables.entity_1?.entity_id, variables.entity_2?.entity_id, variables.entity_3?.entity_id, variables.entity_4?.entity_id, variables.entity_5?.entity_id, variables.entity_6?.entity_id, variables.entity_7?.entity_id]
6969
function entity_check(item) {
7070
if (item != "") {
7171
pills.push("item" + (pills.length+1))

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_welcome_scenes.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ card_scenes_pill_welcome:
243243
- operator: "template"
244244
value: >
245245
[[[
246-
return (entity.state !== 'on' && entity.state !== 'playing' && entity.state != variables?.state)
246+
return (entity?.state !== 'on' && entity?.state !== 'playing' && entity?.state != variables?.state)
247247
]]]
248248
styles:
249249
card:
@@ -341,7 +341,7 @@ card_scenes_pill_welcome:
341341
- operator: "template"
342342
value: >
343343
[[[
344-
return (entity.state !== 'on' && entity.state !== 'playing' && entity.state != variables?.state)
344+
return (entity?.state !== 'on' && entity?.state !== 'playing' && entity?.state != variables?.state)
345345
]]]
346346
styles:
347347
card:
@@ -400,13 +400,13 @@ card_scenes_pill_welcome:
400400
- font-weight: "bold"
401401
- font-size: "9.5px"
402402
- padding-bottom: "7px"
403-
- overflow: "[[[return (entity.state !== 'on' && entity.state !== 'playing' && entity.state != variables?.state) ? 'visible' : 'hidden']]]"
403+
- overflow: "[[[return (entity?.state !== 'on' && entity?.state !== 'playing' && entity?.state != variables?.state) ? 'visible' : 'hidden']]]"
404404
card:
405405
- box-shadow: "none"
406406
- padding: "0px 5px 5px 5px"
407407
- margin-top: "-5px"
408408
- border-radius: "50px"
409-
- overflow: "[[[return (entity.state !== 'on' && entity.state !== 'playing' && entity.state != variables?.state) ? 'visible' : 'hidden']]]"
409+
- overflow: "[[[return (entity?.state !== 'on' && entity?.state !== 'playing' && entity?.state != variables?.state) ? 'visible' : 'hidden']]]"
410410
card_topbar_welcome:
411411
show_icon: false
412412
show_name: false

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml

+38-38
Original file line numberDiff line numberDiff line change
@@ -70,42 +70,42 @@ popup_thermostat_temperature:
7070
- grid-template-areas: >
7171
[[[
7272
var areas = [];
73-
if (variables.ulm_card_thermostat_preset_mode){
74-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("none")) {
73+
if (variables?.ulm_card_thermostat_preset_mode){
74+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("none")) {
7575
areas.push("none");
7676
}
77-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("away")) {
77+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("away")) {
7878
areas.push("away");
7979
}
80-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("comfort")) {
80+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("comfort")) {
8181
areas.push("comfort");
8282
}
83-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("home")) {
83+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("home")) {
8484
areas.push("home");
8585
}
86-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("sleep")) {
86+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("sleep")) {
8787
areas.push("sleep");
8888
}
89-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("activity")) {
89+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("activity")) {
9090
areas.push("activity");
9191
}
9292
} else {
93-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("auto")) {
93+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("auto")) {
9494
areas.push("auto");
9595
}
96-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("heat")) {
96+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat")) {
9797
areas.push("heat");
9898
}
99-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("cool")) {
99+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("cool")) {
100100
areas.push("cool");
101101
}
102-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("dry")) {
102+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("dry")) {
103103
areas.push("dry");
104104
}
105-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("fan_only")) {
105+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("fan_only")) {
106106
areas.push("fan_only");
107107
}
108-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
108+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
109109
areas.push("heat_cool");
110110
}
111111
}
@@ -114,42 +114,42 @@ popup_thermostat_temperature:
114114
- grid-template-columns: >
115115
[[[
116116
var columns = [];
117-
if (variables.ulm_card_thermostat_preset_mode){
118-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("none")) {
117+
if (variables?.ulm_card_thermostat_preset_mode){
118+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("none")) {
119119
columns.push("1fr");
120120
}
121-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("away")) {
121+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("away")) {
122122
columns.push("1fr");
123123
}
124-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("comfort")) {
124+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("comfort")) {
125125
columns.push("1fr");
126126
}
127-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("home")) {
127+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("home")) {
128128
columns.push("1fr");
129129
}
130-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("sleep")) {
130+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("sleep")) {
131131
columns.push("1fr");
132132
}
133-
if (entity.attributes.preset_modes.toString().toLowerCase().includes("activity")) {
133+
if (entity.attributes?.preset_modes.toString().toLowerCase().includes("activity")) {
134134
columns.push("1fr");
135135
}
136136
} else {
137-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("auto")) {
137+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("auto")) {
138138
columns.push("1fr");
139139
}
140-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("heat")) {
140+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat")) {
141141
columns.push("1fr");
142142
}
143-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("cool")) {
143+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("cool")) {
144144
columns.push("1fr");
145145
}
146-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("dry")) {
146+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("dry")) {
147147
columns.push("1fr");
148148
}
149-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("fan_only")) {
149+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("fan_only")) {
150150
columns.push("1fr");
151151
}
152-
if (entity.attributes.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
152+
if (entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
153153
columns.push("1fr");
154154
}
155155
}
@@ -166,7 +166,7 @@ popup_thermostat_temperature:
166166
auto:
167167
- display: >
168168
[[[
169-
if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("auto")) {
169+
if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("auto")) {
170170
return "block";
171171
} else {
172172
return "none";
@@ -175,7 +175,7 @@ popup_thermostat_temperature:
175175
heat:
176176
- display: >
177177
[[[
178-
if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("heat")) {
178+
if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat")) {
179179
return "block";
180180
} else {
181181
return "none";
@@ -184,7 +184,7 @@ popup_thermostat_temperature:
184184
cool:
185185
- display: >
186186
[[[
187-
if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("cool") ) {
187+
if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("cool") ) {
188188
return "block";
189189
} else {
190190
return "none";
@@ -193,7 +193,7 @@ popup_thermostat_temperature:
193193
dry:
194194
- display: >
195195
[[[
196-
if ( !variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("dry")) {
196+
if ( !variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("dry")) {
197197
return "block";
198198
} else {
199199
return "none";
@@ -202,7 +202,7 @@ popup_thermostat_temperature:
202202
fan_only:
203203
- display: >
204204
[[[
205-
if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("fan_only")) {
205+
if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("fan_only")) {
206206
return "block";
207207
} else {
208208
return "none";
@@ -211,7 +211,7 @@ popup_thermostat_temperature:
211211
heat_cool:
212212
- display: >
213213
[[[
214-
if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
214+
if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes?.hvac_modes.toString().toLowerCase().includes("heat_cool")) {
215215
return "block";
216216
} else {
217217
return "none";
@@ -220,7 +220,7 @@ popup_thermostat_temperature:
220220
none:
221221
- display: >
222222
[[[
223-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("none")) {
223+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("none")) {
224224
return "block";
225225
} else {
226226
return "none";
@@ -229,7 +229,7 @@ popup_thermostat_temperature:
229229
away:
230230
- display: >
231231
[[[
232-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("away")) {
232+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("away")) {
233233
return "block";
234234
} else {
235235
return "none";
@@ -238,7 +238,7 @@ popup_thermostat_temperature:
238238
comfort:
239239
- display: >
240240
[[[
241-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("comfort")) {
241+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("comfort")) {
242242
return "block";
243243
} else {
244244
return "none";
@@ -247,7 +247,7 @@ popup_thermostat_temperature:
247247
home:
248248
- display: >
249249
[[[
250-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("home")) {
250+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("home")) {
251251
return "block";
252252
} else {
253253
return "none";
@@ -256,7 +256,7 @@ popup_thermostat_temperature:
256256
sleep:
257257
- display: >
258258
[[[
259-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("sleep")) {
259+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("sleep")) {
260260
return "block";
261261
} else {
262262
return "none";
@@ -265,7 +265,7 @@ popup_thermostat_temperature:
265265
activity:
266266
- display: >
267267
[[[
268-
if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toString().toLowerCase().includes("activity")) {
268+
if (variables?.ulm_card_thermostat_preset_mode && entity.attributes?.preset_modes.toString().toLowerCase().includes("activity")) {
269269
return "block";
270270
} else {
271271
return "none";

0 commit comments

Comments
 (0)