Skip to content

Commit dbb21a3

Browse files
authored
Merge pull request #1276 from UI-Lovelace-Minimalist/release
Release bugfixes v1.3.3
2 parents 708c136 + 17e638c commit dbb21a3

File tree

15 files changed

+67
-39
lines changed

15 files changed

+67
-39
lines changed

custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-ios-tapbar/minimalist-ios-tapbar.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ minimalist-ios-tapbar:
4545
position: fixed !important;
4646
margin: 0 !important;
4747
width: 100%;
48-
height: 100% !important;
4948
}
5049
.header {
5150
top: auto !important;

custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ minimalist-mobile-tapbar:
3939
position: fixed !important;
4040
margin: 0 !important;
4141
width: 100%;
42-
height: 100% !important;
4342
}
4443
.header {
4544
top: auto !important;

custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ ulm_translation_engine:
1616
[[[
1717
if (typeof(entity) !== 'undefined' && entity !== undefined){
1818
let not_active = ['disarmed','off','closed','not_home','standby','idle','docked','unknown','unavailable','paused']
19-
return !not_active.includes(entity.state)
19+
function containsNumbers(str) {
20+
return /\d/.test(str);
21+
}
22+
return (!not_active.includes(entity.state) && !containsNumbers(entity.state))
2023
}
2124
]]]
2225
ulm_translation_hour: >

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml

+28-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ card_graph:
1414
ulm_card_graph_points: "0.5"
1515
ulm_card_graph_group_by: "interval"
1616
ulm_card_graph_line_width: 5
17+
ulm_card_graph_icon_color: ""
1718
triggers_update: "all"
1819
custom_fields:
1920
item1:
@@ -24,7 +25,33 @@ card_graph:
2425
variables:
2526
ulm_card_generic_icon: "[[[ return variables.ulm_card_graph_icon; ]]]"
2627
ulm_card_generic_name: "[[[ return variables.ulm_card_graph_name; ]]]"
27-
28+
custom_fields:
29+
item1:
30+
card:
31+
type: "custom:button-card"
32+
custom_fields:
33+
item1:
34+
card:
35+
type: "custom:button-card"
36+
styles:
37+
icon:
38+
- color: >
39+
[[[
40+
var color = variables.ulm_card_graph_icon_color;
41+
if (variables.ulm_card_graph_icon_color){
42+
return 'rgba(var(--color-' + color + '),1)';
43+
}
44+
return 'rgba(var(--color-theme),0.2)';
45+
]]]
46+
img_cell:
47+
- background-color: >
48+
[[[
49+
var color = variables.ulm_card_graph_icon_color;
50+
if (variables.ulm_card_graph_icon_color){
51+
return 'rgba(var(--color-' + color + '),0.2)';
52+
}
53+
return 'rgba(var(--color-theme),0.05)';
54+
]]]
2855
item2:
2956
card:
3057
type: "custom:mini-graph-card"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ card_binary_sensor:
2020
card:
2121
- background-color: >
2222
[[[
23-
if (variables.ulm_card_binary_sensor_force_background_color || hass.themes.darkMode) {
23+
if (variables.ulm_card_binary_sensor_force_background_color) {
2424
var color = variables.ulm_card_binary_sensor_color;
2525
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2626
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ card_binary_sensor_alert:
1919
card:
2020
- background-color: >
2121
[[[
22-
if (variables.ulm_card_binary_sensor_alert_force_background_color || hass.themes.darkMode) {
22+
if (variables.ulm_card_binary_sensor_alert_force_background_color) {
2323
var color = variables.ulm_card_binary_sensor_alert_color;
2424
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2525
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ card_cover:
3434
- background-color: >
3535
[[[
3636
if (variables.ulm_card_cover_color) {
37-
if (variables.ulm_card_cover_force_background_color || hass.themes.darkMode) {
37+
if (variables.ulm_card_cover_force_background_color) {
3838
var color = variables.ulm_card_cover_color;
3939
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
4040
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ card_fan:
3131
- background-color: >
3232
[[[
3333
if (variables.ulm_card_fan_color) {
34-
if (variables.ulm_card_fan_force_background_color || hass.themes.darkMode) {
34+
if (variables.ulm_card_fan_force_background_color) {
3535
var color = variables.ulm_card_fan_color;
3636
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
3737
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ card_generic:
1717
card:
1818
- background-color: >
1919
[[[
20-
if (variables.ulm_card_generic_force_background_color || hass.themes.darkMode) {
20+
if (variables.ulm_card_generic_force_background_color) {
2121
var color = variables.ulm_card_generic_color;
2222
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2323
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ card_generic_swap:
1717
card:
1818
- background-color: >
1919
[[[
20-
if (variables.ulm_card_generic_swap_force_background_color || hass.themes.darkMode) {
20+
if (variables.ulm_card_generic_swap_force_background_color) {
2121
var color = variables.ulm_card_generic_swap_color;
2222
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2323
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ card_input_boolean:
1717
card:
1818
- background-color: >
1919
[[[
20-
if (variables.ulm_card_input_boolean_force_background_color || hass.themes.darkMode) {
20+
if (variables.ulm_card_input_boolean_force_background_color) {
2121
var color = variables.ulm_card_input_boolean_color;
2222
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2323
}

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

+25-25
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ card_light:
3333
card:
3434
- background-color: >
3535
[[[
36-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
36+
var color_set = (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) ? entity.attributes.rgb_color : variables.ulm_card_light_color;
3737
var color = 'rgba(var(--color-' + color_set + '),var(--opacity-bg))'
38-
if(variables.ulm_card_light_enable_color){
38+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
3939
color = 'rgba(' + color_set + ',var(--opacity-bg))'
4040
}
41-
if (variables.ulm_card_light_force_background_color || hass.themes.darkMode) {
41+
if (variables.ulm_card_light_force_background_color) {
4242
return color
4343
}
4444
]]]
@@ -150,9 +150,9 @@ card_light:
150150
icon:
151151
- color: >
152152
[[[
153-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
153+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
154154
var color = 'rgba(var(--color-' + color_set + '),1)'
155-
if(variables.ulm_card_light_enable_color){
155+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
156156
color = 'rgba(' + color_set + ',1)'
157157
}
158158
if (entity.state != "on") {
@@ -163,9 +163,9 @@ card_light:
163163
img_cell:
164164
- background-color: >
165165
[[[
166-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
166+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
167167
var color = 'rgba(var(--color-' + color_set + '),0.2)'
168-
if(variables.ulm_card_light_enable_color){
168+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
169169
color = 'rgba(' + color_set + ',0.2)'
170170
}
171171
if (entity.state != "on") {
@@ -226,9 +226,9 @@ card_light:
226226
maxSet: "[[[ return variables.ulm_card_light_enable_slider_maxSet ]]]"
227227
mainSliderColor: >
228228
[[[
229-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
229+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
230230
var color = 'rgba(var(--color-' + color_set + '),1)'
231-
if(variables.ulm_card_light_enable_color){
231+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
232232
color = 'rgba(' + color_set + ',1)'
233233
}
234234
if (entity.state == "unavailable") {
@@ -241,9 +241,9 @@ card_light:
241241
]]]
242242
secondarySliderColor: >
243243
[[[
244-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
244+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
245245
var color = 'rgba(var(--color-' + color_set + '),0.2)'
246-
if(variables.ulm_card_light_enable_color){
246+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
247247
color = 'rgba(' + color_set + ',0.2)'
248248
}
249249
if (entity.state == "unavailable") {
@@ -253,9 +253,9 @@ card_light:
253253
]]]
254254
thumbColor: >
255255
[[[
256-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
256+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
257257
var color = 'rgba(var(--color-' + color_set + '),1)'
258-
if(variables.ulm_card_light_enable_color){
258+
if(variables.ulm_card_light_enable_color && entity.attributes.rgb_color){
259259
color = 'rgba(' + color_set + ',1)'
260260
}
261261
if (entity.state == "unavailable") {
@@ -306,9 +306,9 @@ card_light:
306306
[[[
307307
if (variables.ulm_card_light_force_background_color) {
308308
if (entity.state != "off") {
309-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
309+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
310310
var color = 'rgba(var(--color-' + color_set + '),0.2)'
311-
if (variables.ulm_card_light_enable_color) {
311+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
312312
color = 'rgba(' + color_set + ',0.2)';
313313
}
314314
return color;
@@ -320,9 +320,9 @@ card_light:
320320
[[[
321321
if (variables.ulm_card_light_force_background_color) {
322322
if (entity.state != "off") {
323-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
323+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
324324
var color = 'rgba(var(--color-' + color_set + '),1)';
325-
if (variables.ulm_card_light_enable_color) {
325+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
326326
color = 'rgba(' + color_set + ',1)';
327327
}
328328
return color;
@@ -358,9 +358,9 @@ card_light:
358358
[[[
359359
if (variables.ulm_card_light_force_background_color) {
360360
if (entity.state != "off") {
361-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
361+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
362362
var color = 'rgba(var(--color-' + color_set + '),0.2)'
363-
if (variables.ulm_card_light_enable_color) {
363+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
364364
color = 'rgba(' + color_set + ',0.2)';
365365
}
366366
return color;
@@ -372,9 +372,9 @@ card_light:
372372
[[[
373373
if (variables.ulm_card_light_force_background_color) {
374374
if (entity.state != "off") {
375-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
375+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
376376
var color = 'rgba(var(--color-' + color_set + '),1)';
377-
if (variables.ulm_card_light_enable_color) {
377+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
378378
color = 'rgba(' + color_set + ',1)';
379379
}
380380
return color;
@@ -410,9 +410,9 @@ card_light:
410410
[[[
411411
if (variables.ulm_card_light_force_background_color) {
412412
if (entity.state != "off") {
413-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
413+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
414414
var color = 'rgba(var(--color-' + color_set + '),0.2)'
415-
if (variables.ulm_card_light_enable_color) {
415+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
416416
color = 'rgba(' + color_set + ',0.2)';
417417
}
418418
return color;
@@ -424,9 +424,9 @@ card_light:
424424
[[[
425425
if (variables.ulm_card_light_force_background_color) {
426426
if (entity.state != "off") {
427-
var color_set = variables.ulm_card_light_enable_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
427+
var color_set = variables.ulm_card_light_enable_color && entity.attributes.rgb_color ? entity.attributes.rgb_color : variables.ulm_card_light_color;
428428
var color = 'rgba(var(--color-' + color_set + '),1)';
429-
if (variables.ulm_card_light_enable_color) {
429+
if (variables.ulm_card_light_enable_color && entity.attributes.rgb_color) {
430430
color = 'rgba(' + color_set + ',1)';
431431
}
432432
return color;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ card_media_player:
3131
- background-color: >
3232
[[[
3333
if (variables.ulm_card_media_player_color) {
34-
if (variables.ulm_card_media_player_force_background_color || hass.themes.darkMode) {
34+
if (variables.ulm_card_media_player_force_background_color) {
3535
var color = variables.ulm_card_media_player_color;
3636
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
3737
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ card_power_outlet:
1818
card:
1919
- background-color: >
2020
[[[
21-
if (variables.ulm_card_power_outlet_force_background_color || hass.themes.darkMode) {
21+
if (variables.ulm_card_power_outlet_force_background_color) {
2222
var color = variables.ulm_card_power_outlet_color;
2323
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
2424
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ card_vacuum:
3838
- background-color: >
3939
[[[
4040
if (variables.ulm_card_vacuum_color) {
41-
if (variables.ulm_card_vacuum_force_background_color || hass.themes.darkMode) {
41+
if (variables.ulm_card_vacuum_force_background_color) {
4242
var color = variables.ulm_card_vacuum_color;
4343
return 'rgba(var(--color-' + color + '),var(--opacity-bg))';
4444
}

0 commit comments

Comments
 (0)