Skip to content

Commit 5b1a4a4

Browse files
authored
Merge pull request #935 from UI-Lovelace-Minimalist/release
Release V1.1.1
2 parents 90fdcbe + e85d8b0 commit 5b1a4a4

File tree

17 files changed

+565
-96
lines changed

17 files changed

+565
-96
lines changed

custom_components/ui_lovelace_minimalist/const.py

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"Polish": "pl",
3232
"Portuguese": "pt",
3333
"Portuguese (Brazil)": "pt-BR",
34+
"Slovenian": "sl",
3435
"Slovak": "sk",
3536
"Swedish": "sv",
3637
"Turkish": "tr",
@@ -51,6 +52,7 @@
5152
"Polish",
5253
"Portuguese",
5354
"Portuguese (Brazil)",
55+
"Slovenian",
5456
"Slovak",
5557
"Swedish",
5658
"Turkish",

custom_components/ui_lovelace_minimalist/lovelace/adaptive-dash/popup/popup.yaml

+25-25
Original file line numberDiff line numberDiff line change
@@ -17,125 +17,125 @@ states:
1717
# light 1:
1818
# type: "custom:button-card"
1919
# template: "popup_light_brightness"
20-
# entity:
20+
# entity: <your_entity>
2121
# light 2:
2222
# type: "custom:button-card"
2323
# template: "popup_light_brightness"
24-
# entity:
24+
# entity: <your_entity>
2525
# light 3:
2626
# type: "custom:button-card"
2727
# template: "popup_light_brightness"
28-
# entity:
28+
# entity: <your_entity>
2929
# light 4:
3030
# type: "custom:button-card"
3131
# template: "popup_light_brightness"
32-
# entity:
32+
# entity: <your_entity>
3333
# light 5:
3434
# type: "custom:button-card"
3535
# template: "popup_light_brightness"
36-
# entity:
36+
# entity: <your_entity>
3737
# light 6:
3838
# type: "custom:button-card"
3939
# template: "popup_light_brightness"
40-
# entity:
40+
# entity: <your_entity>
4141
# light 7:
4242
# type: "custom:button-card"
4343
# template: "popup_light_brightness"
44-
# entity:
44+
# entity: <your_entity>
4545
# light 8:
4646
# type: "custom:button-card"
4747
# template: "popup_light_brightness"
48-
# entity:
48+
# entity: <your_entity>
4949
# light 9:
5050
# type: "custom:button-card"
5151
# template: "popup_light_brightness"
52-
# entity:
52+
# entity: <your_entity>
5353
# light 10:
5454
# type: "custom:button-card"
5555
# template: "popup_light_brightness"
56-
# entity:
56+
# entity: <your_entity>
5757
#
5858
### Mediaplayers
5959
# mediaplayer 1:
6060
# type: "custom:button-card"
6161
# template: "popup_media_player_infos"
62-
# entity:
62+
# entity: <your_entity>
6363
# mediaplayer 2:
6464
# type: "custom:button-card"
6565
# template: "popup_media_player_infos"
66-
# entity:
66+
# entity: <your_entity>
6767
# mediaplayer 3:
6868
# type: "custom:button-card"
6969
# template: "popup_media_player_infos"
70-
# entity:
70+
# entity: <your_entity>
7171
# mediaplayer 4:
7272
# type: "custom:button-card"
7373
# template: "popup_media_player_infos"
74-
# entity:
74+
# entity: <your_entity>
7575
# mediaplayer 5:
7676
# type: "custom:button-card"
7777
# template: "popup_media_player_infos"
78-
# entity:
78+
# entity: <your_entity>
7979
#
8080
### Thermostats
8181
# climate 1:
8282
# type: "custom:button-card"
8383
# template: "popup_thermostat_temperature"
84-
# entity:
84+
# entity: <your_entity>
8585
# climate 2:
8686
# type: "custom:button-card"
8787
# template: "popup_thermostat_temperature"
88-
# entity:
88+
# entity: <your_entity>
8989
# climate 3:
9090
# type: "custom:button-card"
9191
# template: "popup_thermostat_temperature"
92-
# entity:
92+
# entity: <your_entity>
9393
# climate 4:
9494
# type: "custom:button-card"
9595
# template: "popup_thermostat_temperature"
96-
# entity:
96+
# entity: <your_entity>
9797
# climate 5:
9898
# type: "custom:button-card"
9999
# template: "popup_thermostat_temperature"
100-
# entity:
100+
# entity: <your_entity>
101101
#
102102
### Power
103103
# power 1:
104104
# type: "custom:button-card"
105105
# template: "popup_power_outlet_stats"
106-
# entity:
106+
# entity: <your_entity>
107107
# variables:
108108
# ulm_popup_power_outlet_sensor1:
109109
# ulm_popup_power_outlet_sensor2:
110110
# ulm_popup_power_outlet_graph_sensor:
111111
# power 2:
112112
# type: "custom:button-card"
113113
# template: "popup_power_outlet_stats"
114-
# entity:
114+
# entity: <your_entity>
115115
# variables:
116116
# ulm_popup_power_outlet_sensor1:
117117
# ulm_popup_power_outlet_sensor2:
118118
# ulm_popup_power_outlet_graph_sensor:
119119
# power 3:
120120
# type: "custom:button-card"
121121
# template: "popup_power_outlet_stats"
122-
# entity:
122+
# entity: <your_entity>
123123
# variables:
124124
# ulm_popup_power_outlet_sensor1:
125125
# ulm_popup_power_outlet_sensor2:
126126
# ulm_popup_power_outlet_graph_sensor:
127127
# power 4:
128128
# type: "custom:button-card"
129129
# template: "popup_power_outlet_stats"
130-
# entity:
130+
# entity: <your_entity>
131131
# variables:
132132
# ulm_popup_power_outlet_sensor1:
133133
# ulm_popup_power_outlet_sensor2:
134134
# ulm_popup_power_outlet_graph_sensor:
135135
# power 5:
136136
# type: "custom:button-card"
137137
# template: "popup_power_outlet_stats"
138-
# entity:
138+
# entity: <your_entity>
139139
# variables:
140140
# ulm_popup_power_outlet_sensor1:
141141
# ulm_popup_power_outlet_sensor2:

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

+74-14
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,29 @@ ulm_actions_card:
3434
]]]
3535
navigation_path: "[[[ return variables.ulm_card_tap_action == 'navigate' ? variables.ulm_card_tap_navigate_path : '/0' ]]]"
3636
haptic: "[[[ return variables.ulm_card_tap_haptic != null ? variables.ulm_card_tap_haptic : 'none' ]]]"
37-
service: "input_select.select_option"
38-
service_data:
39-
option: "[[[ return variables.ulm_input_select_option ]]]"
40-
entity_id: "[[[ return variables.ulm_input_select ]]]"
37+
service: >
38+
[[[
39+
var action = variables.ulm_card_tap_action;
40+
41+
if (action == 'adaptive'){
42+
return 'input_select.select_option';
43+
}
44+
45+
return variables.ulm_card_tap_service;
46+
]]]
47+
service_data: >
48+
[[[
49+
var action = variables.ulm_card_tap_action;
50+
51+
if (action == 'adaptive'){
52+
return {
53+
'option': variables.ulm_input_select_option,
54+
'entity_id': variables.ulm_input_select
55+
};
56+
}
57+
58+
return variables.ulm_card_tap_service_data;
59+
]]]
4160
browser_mod:
4261
command: "popup"
4362
large: true
@@ -85,6 +104,7 @@ ulm_actions_card:
85104
return popup_config.popup_variables;
86105
}
87106
}
107+
return {};
88108
]]]
89109
hold_action:
90110
action: >
@@ -115,14 +135,33 @@ ulm_actions_card:
115135
action = 'more-info'
116136
}
117137
118-
return action
138+
return action;
119139
]]]
120140
navigation_path: "[[[ return variables.ulm_card_hold_action == 'navigate' ? variables.ulm_card_hold_navigate_path : '/0' ]]]"
121141
haptic: "[[[ return variables.ulm_card_hold_haptic != null ? variables.ulm_card_hold_haptic : 'none' ]]]"
122-
service: "input_select.select_option"
123-
service_data:
124-
option: "[[[ return variables.ulm_input_select_option ]]]"
125-
entity_id: "[[[ return variables.ulm_input_select ]]]"
142+
service: >
143+
[[[
144+
var action = variables.ulm_card_hold_action;
145+
146+
if (action == 'adaptive'){
147+
return 'input_select.select_option';
148+
}
149+
150+
return variables.ulm_card_hold_service;
151+
]]]
152+
service_data: >
153+
[[[
154+
var action = variables.ulm_card_hold_action;
155+
156+
if (action == 'adaptive'){
157+
return {
158+
'option': variables.ulm_input_select_option,
159+
'entity_id': variables.ulm_input_select
160+
};
161+
}
162+
163+
return variables.ulm_card_hold_service_data;
164+
]]]
126165
browser_mod:
127166
command: "popup"
128167
large: true
@@ -170,6 +209,7 @@ ulm_actions_card:
170209
return popup_config.popup_variables;
171210
}
172211
}
212+
return {};
173213
]]]
174214
double_tap_action:
175215
action: >
@@ -200,14 +240,33 @@ ulm_actions_card:
200240
action = 'more-info'
201241
}
202242
203-
return action
243+
return action;
204244
]]]
205245
navigation_path: "[[[ return variables.ulm_card_double_tap_action == 'navigate' ? variables.ulm_card_double_tap_navigate_path : '/0' ]]]"
206246
haptic: "[[[ return variables.ulm_card_double_tap_haptic != null ? variables.ulm_card_double_tap_haptic : 'none' ]]]"
207-
service: "input_select.select_option"
208-
service_data:
209-
option: "[[[ return variables.ulm_input_select_option ]]]"
210-
entity_id: "[[[ return variables.ulm_input_select ]]]"
247+
service: >
248+
[[[
249+
var action = variables.ulm_card_double_tap_action;
250+
251+
if (action == 'adaptive'){
252+
return 'input_select.select_option';
253+
}
254+
255+
return variables.ulm_card_double_tap_service;
256+
]]]
257+
service_data: >
258+
[[[
259+
var action = variables.ulm_card_double_tap_action;
260+
261+
if (action == 'adaptive'){
262+
return {
263+
'option': variables.ulm_input_select_option,
264+
'entity_id': variables.ulm_input_select
265+
};
266+
}
267+
268+
return variables.ulm_card_double_tap_service_data;
269+
]]]
211270
browser_mod:
212271
command: "popup"
213272
large: true
@@ -255,4 +314,5 @@ ulm_actions_card:
255314
return popup_config.popup_variables;
256315
}
257316
}
317+
return {};
258318
]]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
### Overlay to enable custom actions card over other cards ###
3+
ulm_actions_card_overlay:
4+
template:
5+
- "ulm_custom_actions"
6+
- "ulm_actions_card"
7+
styles:
8+
grid:
9+
- position: "relative"
10+
- z-index: 0
11+
custom_fields:
12+
actions_card_overlay:
13+
- position: "absolute"
14+
- left: "0px"
15+
- top: "0px"
16+
- height: "100%"
17+
- width: "100%"
18+
- display: "grid"
19+
- z-index: 10
20+
custom_fields:
21+
actions_card_overlay:
22+
card:
23+
type: "custom:button-card"
24+
template:
25+
- "ulm_actions_card"
26+
entity: "[[[ return (entity != null) ? entity.entity_id : null; ]]]"
27+
show_icon: false
28+
show_name: false
29+
show_label: false
30+
styles:
31+
card:
32+
- height: "100%"
33+
- background: "none"
34+
variables:
35+
ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]"
36+
ulm_input_select: "[[[ return variables.ulm_input_select; ]]]"
37+
ulm_card_tap_action: "[[[ return variables.ulm_card_tap_action; ]]]"
38+
ulm_card_tap_haptic: "[[[ return variables.ulm_card_tap_haptic; ]]]"
39+
ulm_card_tap_navigate_path: "[[[ return variables.ulm_card_tap_navigate_path; ]]]"
40+
ulm_card_hold_action: "[[[ return variables.ulm_card_hold_action; ]]]"
41+
ulm_card_hold_haptic: "[[[ return variables.ulm_card_hold_haptic; ]]]"
42+
ulm_card_hold_navigate_path: "[[[ return variables.ulm_card_hold_navigate_path; ]]]"
43+
ulm_card_double_tap_action: "[[[ return variables.ulm_card_double_tap_action; ]]]"
44+
ulm_card_double_tap_haptic: "[[[ return variables.ulm_card_double_tap_haptic; ]]]"
45+
ulm_card_double_tap_navigate_path: "[[[ return variables.ulm_card_double_tap_navigate_path; ]]]"
46+
ulm_custom_popup: "[[[ return variables.ulm_custom_popup; ]]]"

0 commit comments

Comments
 (0)