Skip to content

Commit bb2acec

Browse files
authored
Merge pull request #1174 from UI-Lovelace-Minimalist/release
Release V1.2.0
2 parents 3400087 + f7deab4 commit bb2acec

File tree

51 files changed

+2408
-653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2408
-653
lines changed

.github/pull_request_template.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
-->
1111

1212
- This PR fixes or closes issue: fixes #
13-
- This PR is related to issue:
14-
- Link to documentation pull request:
13+
- This PR is related to issue:
14+
- Link to documentation pull request:
1515

1616
## Checklist
1717
<!--
@@ -24,7 +24,5 @@
2424
- [ ] The code change is tested and works locally.
2525
- [ ] There is no commented out code in this PR.
2626
- [ ] I have followed the [contribution guidelines](https://github.com/UI-Lovelace-Minimalist/UI/blob/main/.github/CONTRIBUTING.md)
27-
- [ ] This PR is for a custom-card or documentation change and therefore directed to the `main` branch.
28-
- [ ] This PR is for a official card or any other directly to the integration related change and therefore directed to the `release` branch.
29-
30-
27+
- [ ] This PR is for a custom-card or documentation change and therefore directed to the `main` branch.
28+
- [ ] This PR is for a official card or any other directly to the integration related change and therefore directed to the `release` branch.

custom_cards/custom_card_bar_card/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ This card needs the following to function correctly:
7878
<td>Overwrites the sensor name</td>
7979
</tr>
8080
<tr>
81+
<td>ulm_custom_card_bar_card_icon</td>
82+
<td>"mdi:icon"</td>
83+
<td>no</td>
84+
<td>Sensor Icon</td>
85+
<td>Overwrites the sensor icon</td>
86+
</tr>
87+
<tr>
8188
<td>ulm_custom_card_bar_card_value</td>
8289
<td>true / false</td>
8390
<td>no</td>

custom_cards/custom_card_bar_card/custom_card_bar_card.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ custom_card_bar_card:
2222
- "card_generic"
2323
variables:
2424
ulm_card_generic_name: "[[[ return variables.ulm_custom_card_bar_card_name != '' ? variables.ulm_custom_card_bar_card_name : '' ]]]"
25+
ulm_card_generic_icon: "[[[ return variables.ulm_custom_card_bar_card_icon != '' ? variables.ulm_custom_card_bar_card_icon : '' ]]]"
2526
styles:
2627
card:
2728
- box-shadow: "none"

custom_cards/custom_card_imswel_person/custom_card_imswel_person.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ custom_popup_imswel_person:
114114
service: "browser_mod.popup"
115115
data:
116116
title: "[[[ return states[variables.ulm_card_imswel_person_entity].attributes.friendly_name ]]]"
117+
size: >
118+
[[[
119+
const mediaQuery = window.matchMedia('(max-width: 800px)')
120+
if (mediaQuery.matches) {
121+
return 'fullscreen'
122+
}
123+
]]]
117124
style:
118125
$: >
119126
[[[

custom_cards/custom_card_saxel_fan/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ This card needs the following to function correctly:
108108
<td>no</td>
109109
<td>true/false if the fan speed row should collapse when the fan is turned off. Default: true</td>
110110
</tr>
111+
<tr>
112+
<td>ulm_card_fan_horizontal</td>
113+
<td>true</td>
114+
<td>no</td>
115+
<td>Single Line Horizontal Control. Collapsible MUST be false for this currently. Default: false</td>
116+
</tr>
117+
<tr>
118+
<td>ulm_show_button</td>
119+
<td>false</td>
120+
<td>no</td>
121+
<td>Set to false to remove the Button and have a full width Slider. Default: true</td>
122+
</tr>
123+
<tr>
124+
<td>ulm_button_icon</td>
125+
<td>mdi:button</td>
126+
<td>no</td>
127+
<td>Set the icon for the Button. Default: mdi:rotate-3d-variant</td>
128+
</tr>
129+
<tr>
130+
<td>ulm_button_service</td>
131+
<td>fan.toggle</td>
132+
<td>no</td>
133+
<td>Name of the Service Call on button press. Default: fan.oscillate</td>
134+
</tr>
111135
<tr>
112136
<td>oscillate_attribute</td>
113137
<td>oscillate</td>

custom_cards/custom_card_saxel_fan/custom_card_saxel_fan.yaml

+76-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
### Card Fan ###
23
custom_card_saxel_fan:
34
template:
45
- "custom_card_saxel_fan_common"
@@ -56,29 +57,92 @@ custom_card_saxel_fan_blue:
5657

5758
# Common template, don't use
5859
custom_card_saxel_fan_common:
60+
template:
61+
- "ulm_translation_engine"
62+
- "ulm_language_variables"
63+
- "icon_info_bg"
5964
variables:
60-
collapsable: true
6165
mainSliderColor:
6266
secondarySliderColor:
67+
ulm_card_fan_horizontal: false
68+
collapsable: true
69+
ulm_card_fan_temp_attribute: "temp"
70+
ulm_card_fan_hum_attribute: "hum"
71+
always_show_attributes: false
72+
ulm_show_button: true
73+
ulm_button_icon: "mdi:rotate-3d-variant"
74+
ulm_button_service: "fan.oscillate"
6375
oscillate_attribute: "oscillate"
64-
template:
65-
- "ulm_translation_engine"
66-
- "icon_info_bg"
6776
hold_action:
6877
action: "more-info"
6978
label: |-
7079
[[[
71-
if (entity.state === 'on') {
72-
return `${entity.attributes.percentage}%`;
80+
if (entity.state != 'unavailable') {
81+
if (variables.ulm_card_fan_slider_temp_attribute != False) {
82+
var temp = Math.round(entity.attributes[variables.ulm_card_fan_temp_attribute]);
83+
let temp_str = ' • ' + (temp ? temp : '0') + '°C';
84+
} else {
85+
let temp_str = ''
86+
}
87+
if (variables.ulm_card_fan_slider_hum_attribute != False) {
88+
var hum = Math.round(entity.attributes[variables.ulm_card_fan_hum_attribute]);
89+
let hum_str = ' • ' + (hum ? hum : '0') + '%';
90+
} else {
91+
let hum_str = ''
92+
}
93+
94+
if (entity.state == 'off') {
95+
if (variables.always_show_attributes == true) {
96+
return variables.ulm_off + temp_str + hum_str
97+
} else {
98+
return variables.ulm_off
99+
}
100+
} else if (entity.state == 'on') {
101+
if (entity.attributes.percentage != null) {
102+
var per = entity.attributes.percentage;
103+
return (per ? per : '0') + '%' + temp_str + hum_str;
104+
} else {
105+
return variables.ulm_on
106+
}
107+
}
108+
73109
} else {
74-
return variables.ulm_translation_state;
110+
return variables.ulm_unavailable;
75111
}
76112
]]]
77113
styles:
78114
grid:
79-
- grid-template-areas: "'i n n' 'i l l' 'slider slider button'"
80-
- grid-template-columns: "min-content 2fr 1fr"
81-
- grid-template-rows: "min-content min-content min-content"
115+
- grid-template-areas: >
116+
[[[
117+
if (!variables.ulm_card_fan_horizontal) {
118+
if (!variables.ulm_show_button) {
119+
return "'i n n slider slider slider' 'i l l . slider slider slider'"
120+
} else {
121+
return "'i n n slider slider button' 'i l l . slider slider button'"
122+
}
123+
} else {
124+
if (!variables.ulm_show_button) {
125+
return "'i n n' 'i l l' 'slider slider slider'"
126+
} else {
127+
return "'i n n' 'i l l' 'slider slider button'"
128+
}
129+
]]]
130+
- grid-template-columns: >
131+
[[[
132+
if (!variables.ulm_card_fan_horizontal) {
133+
return "min-content 2fr 1fr 1fr 1fr 1fr"
134+
} else {
135+
return "min-content 2fr 1fr"
136+
}
137+
]]]
138+
- grid-template-rows: >
139+
[[[
140+
if (!variables.ulm_card_fan_horizontal) {
141+
return "min-content min-content"
142+
} else {
143+
return "min-content min-content min-content"
144+
}
145+
]]]
82146
custom_fields:
83147
slider:
84148
- margin-top: |-
@@ -133,11 +197,11 @@ custom_card_saxel_fan_common:
133197
state: "[[[ return variables.collapsable ? 'on' : entity.state; ]]]"
134198
card:
135199
type: "custom:button-card"
136-
icon: "mdi:rotate-3d-variant"
200+
icon: "[[[ return variables.ulm_button_icon ]]]"
137201
entity: "[[[ return entity.entity_id ]]]"
138202
tap_action:
139203
action: "call-service"
140-
service: "fan.oscillate"
204+
service: "[[[ return variables.ulm_button_service ]]]"
141205
service_data:
142206
entity_id: "[[[ return entity.entity_id; ]]]"
143207
oscillating: "[[[ return !entity.attributes[variables.oscillate_attribute] ]]]"

custom_cards/custom_card_schumijo_car/custom_card_schumijo_car.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ ulm_custom_card_schumijo_ca_popup:
109109
browser_mod:
110110
service: "browser_mod.popup"
111111
data:
112+
size: >
113+
[[[
114+
const mediaQuery = window.matchMedia('(max-width: 800px)')
115+
if (mediaQuery.matches) {
116+
return 'fullscreen'
117+
}
118+
]]]
112119
title: "Map"
113120
style:
114121
$: >

custom_components/ui_lovelace_minimalist/cards/lovelace-auto-entities/lovelace-auto-entities.js

+20-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

custom_components/ui_lovelace_minimalist/cards/lovelace-card-mod/lovelace-card-mod.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

custom_components/ui_lovelace_minimalist/cards/lovelace-layout-card/lovelace-layout-card.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)