Skip to content

Commit 327582f

Browse files
authored
Merge pull request #989 from UI-Lovelace-Minimalist/release
Release V1.1.4
2 parents be65ddc + 3042ca7 commit 327582f

31 files changed

+505
-94
lines changed

custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ ulm_translation_engine:
88
ulm_translation_scenes: "[[[ return hass.resources[hass['language']]['ui.dialogs.quick-bar.commands.reload.scene']; ]]]"
99
ulm_translation_source: "[[[ return hass.resources[hass['language']]['ui.card.media_player.source']; ]]]"
1010
ulm_translation_history: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.history']; ]]]"
11+
ulm_translation_close_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.close_cover']; ]]]"
12+
ulm_translation_stop_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.stop_cover']; ]]]"
13+
ulm_translation_open_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.open_cover']; ]]]"
1114
ulm_translation_hour: >
1215
[[[
1316
var number = hass.resources[hass['language']]["ui.duration.hour"];

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml

+9-12
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ulm_actions_card:
4343
if (action == 'adaptive'){
4444
return 'input_select.select_option';
4545
}
46-
if(entity.entity_id.startsWith("media_player.")){
46+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
4747
return 'media_player.media_play_pause';
4848
}
4949
return variables.ulm_card_tap_service;
@@ -58,7 +58,7 @@ ulm_actions_card:
5858
'entity_id': variables.ulm_input_select
5959
};
6060
}
61-
if(entity.entity_id.startsWith("media_player.")){
61+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
6262
return {
6363
'entity_id': entity.entity_id
6464
};
@@ -74,8 +74,7 @@ ulm_actions_card:
7474
--popup-border-radius: 20px;
7575
--popup-padding-x: 24px;
7676
--popup-padding-y: 20px;
77-
--popup-max-width: auto
78-
--popup-min-width: 800px;
77+
--popup-min-width: 1000px;
7978
card_mod:
8079
style:
8180
ha-dialog$: |
@@ -161,7 +160,7 @@ ulm_actions_card:
161160
if (action == 'adaptive'){
162161
return 'input_select.select_option';
163162
}
164-
if(entity.entity_id.startsWith("media_player.")){
163+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
165164
return 'media_player.media_play_pause';
166165
}
167166
return variables.ulm_card_hold_service;
@@ -176,7 +175,7 @@ ulm_actions_card:
176175
'entity_id': variables.ulm_input_select
177176
};
178177
}
179-
if(entity.entity_id.startsWith("media_player.")){
178+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
180179
return {
181180
'entity_id': entity.entity_id
182181
};
@@ -192,8 +191,7 @@ ulm_actions_card:
192191
--popup-border-radius: 20px;
193192
--popup-padding-x: 24px;
194193
--popup-padding-y: 20px;
195-
--popup-max-width: auto
196-
--popup-min-width: 800px;
194+
--popup-min-width: 1000px;
197195
card_mod:
198196
style:
199197
ha-dialog$: |
@@ -279,7 +277,7 @@ ulm_actions_card:
279277
if (action == 'adaptive'){
280278
return 'input_select.select_option';
281279
}
282-
if(entity.entity_id.startsWith("media_player.")){
280+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
283281
return 'media_player.media_play_pause';
284282
}
285283
return variables.ulm_card_double_tap_service;
@@ -294,7 +292,7 @@ ulm_actions_card:
294292
'entity_id': variables.ulm_input_select
295293
};
296294
}
297-
if(entity.entity_id.startsWith("media_player.")){
295+
if((entity != null) && entity.entity_id.startsWith("media_player.")){
298296
return {
299297
'entity_id': entity.entity_id
300298
};
@@ -310,8 +308,7 @@ ulm_actions_card:
310308
--popup-border-radius: 20px;
311309
--popup-padding-x: 24px;
312310
--popup-padding-y: 20px;
313-
--popup-max-width: auto
314-
--popup-min-width: 800px;
311+
--popup-min-width: 1000px;
315312
card_mod:
316313
style:
317314
ha-dialog$: |

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ ulm_actions_icon:
7474
--popup-border-radius: 20px;
7575
--popup-padding-x: 24px;
7676
--popup-padding-y: 20px;
77-
--popup-max-width: auto
78-
--popup-min-width: 800px;
77+
--popup-min-width: 1000px;
7978
card_mod:
8079
style:
8180
ha-dialog$: |
@@ -191,8 +190,7 @@ ulm_actions_icon:
191190
--popup-border-radius: 20px;
192191
--popup-padding-x: 24px;
193192
--popup-padding-y: 20px;
194-
--popup-max-width: auto
195-
--popup-min-width: 800px;
193+
--popup-min-width: 1000px;
196194
card_mod:
197195
style:
198196
ha-dialog$: |
@@ -256,7 +254,7 @@ ulm_actions_icon:
256254
if (domain == "media_player" && action == 'toggle'){
257255
action = 'call-service';
258256
}
259-
if (action == 'popup' && (variables.ulm_card_light_enable_popup || variables.ulm_card_media_player_enable_popup || variables.ulm_card_thermostat_enable_popup) ){
257+
if (action == 'popup' && (variables.ulm_card_light_enable_popup || variables.ulm_card_media_player_enable_popup || variables.ulm_card_thermostat_enable_popup || variables.ulm_card_cover_enable_popup)){
260258
action = 'fire-dom-event'
261259
}
262260
@@ -313,8 +311,7 @@ ulm_actions_icon:
313311
--popup-border-radius: 20px;
314312
--popup-padding-x: 24px;
315313
--popup-padding-y: 20px;
316-
--popup-max-width: auto
317-
--popup-min-width: 800px;
314+
--popup-min-width: 1000px;
318315
card_mod:
319316
style:
320317
ha-dialog$: |

custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml

+3-7
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ ulm_actions_name:
6363
'entity_id': entity.entity_id
6464
};
6565
}
66-
}
6766
return variables.ulm_name_tap_service_data;
6867
]]]
6968
browser_mod:
@@ -75,8 +74,7 @@ ulm_actions_name:
7574
--popup-border-radius: 20px;
7675
--popup-padding-x: 24px;
7776
--popup-padding-y: 20px;
78-
--popup-max-width: auto
79-
--popup-min-width: 800px;
77+
--popup-min-width: 1000px;
8078
card_mod:
8179
style:
8280
ha-dialog$: |
@@ -193,8 +191,7 @@ ulm_actions_name:
193191
--popup-border-radius: 20px;
194192
--popup-padding-x: 24px;
195193
--popup-padding-y: 20px;
196-
--popup-max-width: auto
197-
--popup-min-width: 800px;
194+
--popup-min-width: 1000px;
198195
card_mod:
199196
style:
200197
ha-dialog$: |
@@ -311,8 +308,7 @@ ulm_actions_name:
311308
--popup-border-radius: 20px;
312309
--popup-padding-x: 24px;
313310
--popup-padding-y: 20px;
314-
--popup-max-width: auto
315-
--popup-min-width: 800px;
311+
--popup-min-width: 1000px;
316312
card_mod:
317313
style:
318314
ha-dialog$: |

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

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ card_graph:
1212
ulm_card_graph_hours: 24
1313
ulm_card_graph_type: "fill"
1414
ulm_card_graph_points: "0.5"
15+
ulm_card_graph_group_by: "interval"
1516
triggers_update: "all"
1617
custom_fields:
1718
item1:
@@ -51,6 +52,7 @@ card_graph:
5152
fill: "[[[ return variables.ulm_card_graph_type=='fill'?true:false; ]]]"
5253
hours_to_show: "[[[ return variables.ulm_card_graph_hours; ]]]"
5354
points_per_hour: "[[[ return variables.ulm_card_graph_points; ]]]"
55+
group_by: "[[[ return variables.ulm_card_graph_group_by; ]]]"
5456
style: |
5557
ha-card {
5658
box-shadow: none;

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

+67-7
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ card_cover:
8989
card:
9090
type: "custom:button-card"
9191
entity: "[[[ return entity.entity_id ]]]"
92+
variables: >
93+
[[[
94+
let vars = variables;
95+
if(variables.ulm_card_cover_enable_popup) {
96+
vars.ulm_custom_popup = {
97+
'template': 'popup_cover'
98+
};
99+
}
100+
return vars;
101+
]]]
92102
icon: |
93103
[[[
94104
var icon = "mdi:help-circle";
@@ -101,7 +111,7 @@ card_cover:
101111
} else if (variables.ulm_card_cover_gate){
102112
var icon = "mdi:gate";
103113
} else
104-
var icon = "mdi:window-shutter";
114+
var icon = "mdi:roller-shade-closed";
105115
} else
106116
if (variables.ulm_card_curtain_display_collapse_expand){
107117
var icon = "mdi:curtains";
@@ -110,7 +120,7 @@ card_cover:
110120
} else if (variables.ulm_card_cover_gate){
111121
var icon = "mdi:gate-open";
112122
}else
113-
var icon = "mdi:window-shutter-open";
123+
var icon = "mdi:roller-shade";
114124
} else {
115125
if (states[entity.entity_id].attributes.current_position == 0){
116126
if (variables.ulm_card_curtain_display_collapse_expand){
@@ -120,7 +130,7 @@ card_cover:
120130
} else if(variables.ulm_card_cover_gate){
121131
var icon = "mdi:gate";
122132
} else
123-
var icon = "mdi:window-shutter";
133+
var icon = "mdi:roller-shade-closed";
124134
} else
125135
if (variables.ulm_card_curtain_display_collapse_expand){
126136
var icon = "mdi:curtains";
@@ -130,7 +140,7 @@ card_cover:
130140
var icon = "mdi:gate-open";
131141
}
132142
else
133-
var icon = "mdi:window-shutter-open";
143+
var icon = "mdi:roller-shade";
134144
}
135145
return icon ;
136146
]]]
@@ -171,6 +181,16 @@ card_cover:
171181
card:
172182
type: "custom:button-card"
173183
entity: "[[[ return entity.entity_id ]]]"
184+
variables: >
185+
[[[
186+
let vars = variables;
187+
if(variables.ulm_card_cover_enable_popup) {
188+
vars.ulm_custom_popup = {
189+
'template': 'popup_cover'
190+
};
191+
}
192+
return vars;
193+
]]]
174194
name: "[[[ return variables.ulm_card_cover_name ]]]"
175195
label: >-
176196
[[[
@@ -201,7 +221,27 @@ card_cover:
201221
type: "custom:button-card"
202222
template: "widget_icon"
203223
state:
204-
- value: "closed"
224+
- operator: "template"
225+
value: >
226+
[[[
227+
return entity.attributes.current_position == "0";
228+
]]]
229+
styles:
230+
icon:
231+
- color: "rgba(var(--color-theme),0.4)"
232+
- operator: "template"
233+
value: >
234+
[[[
235+
return entity.state == "closing";
236+
]]]
237+
styles:
238+
icon:
239+
- color: "rgba(var(--color-theme),0.4)"
240+
- operator: "template"
241+
value: >
242+
[[[
243+
return entity.state == "opening";
244+
]]]
205245
styles:
206246
icon:
207247
- color: "rgba(var(--color-theme),0.4)"
@@ -229,13 +269,33 @@ card_cover:
229269
service: "cover.stop_cover"
230270
service_data:
231271
entity_id: "[[[ return entity.entity_id ]]]"
232-
icon: "mdi:pause"
272+
icon: "mdi:stop"
233273
item3:
234274
card:
235275
type: "custom:button-card"
236276
template: "widget_icon"
237277
state:
238-
- value: "open"
278+
- operator: "template"
279+
value: >
280+
[[[
281+
return entity.attributes.current_position == "100";
282+
]]]
283+
styles:
284+
icon:
285+
- color: "rgba(var(--color-theme),0.4)"
286+
- operator: "template"
287+
value: >
288+
[[[
289+
return entity.state == "closing";
290+
]]]
291+
styles:
292+
icon:
293+
- color: "rgba(var(--color-theme),0.4)"
294+
- operator: "template"
295+
value: >
296+
[[[
297+
return entity.state == "opening";
298+
]]]
239299
styles:
240300
icon:
241301
- color: "rgba(var(--color-theme),0.4)"

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

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ card_media_player:
5555
- border-radius: "var(--border-radius)"
5656
- box-shadow: "var(--box-shadow)"
5757
- padding: "12px"
58-
- background-blend-mode: "multiply"
5958
- background: |
6059
[[[
6160
return variables.ulm_card_media_player_enable_art && states[entity.entity_id].attributes.entity_picture != null

0 commit comments

Comments
 (0)