Skip to content

Commit

Permalink
Merge pull request #1174 from UI-Lovelace-Minimalist/release
Browse files Browse the repository at this point in the history
Release V1.2.0
  • Loading branch information
basbruss authored Feb 28, 2023
2 parents 3400087 + f7deab4 commit bb2acec
Show file tree
Hide file tree
Showing 51 changed files with 2,408 additions and 653 deletions.
10 changes: 4 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
-->

- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
- This PR is related to issue:
- Link to documentation pull request:

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


- [ ] This PR is for a custom-card or documentation change and therefore directed to the `main` branch.
- [ ] This PR is for a official card or any other directly to the integration related change and therefore directed to the `release` branch.
7 changes: 7 additions & 0 deletions custom_cards/custom_card_bar_card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ This card needs the following to function correctly:
<td>Overwrites the sensor name</td>
</tr>
<tr>
<td>ulm_custom_card_bar_card_icon</td>
<td>"mdi:icon"</td>
<td>no</td>
<td>Sensor Icon</td>
<td>Overwrites the sensor icon</td>
</tr>
<tr>
<td>ulm_custom_card_bar_card_value</td>
<td>true / false</td>
<td>no</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ custom_card_bar_card:
- "card_generic"
variables:
ulm_card_generic_name: "[[[ return variables.ulm_custom_card_bar_card_name != '' ? variables.ulm_custom_card_bar_card_name : '' ]]]"
ulm_card_generic_icon: "[[[ return variables.ulm_custom_card_bar_card_icon != '' ? variables.ulm_custom_card_bar_card_icon : '' ]]]"
styles:
card:
- box-shadow: "none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ custom_popup_imswel_person:
service: "browser_mod.popup"
data:
title: "[[[ return states[variables.ulm_card_imswel_person_entity].attributes.friendly_name ]]]"
size: >
[[[
const mediaQuery = window.matchMedia('(max-width: 800px)')
if (mediaQuery.matches) {
return 'fullscreen'
}
]]]
style:
$: >
[[[
Expand Down
24 changes: 24 additions & 0 deletions custom_cards/custom_card_saxel_fan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,30 @@ This card needs the following to function correctly:
<td>no</td>
<td>true/false if the fan speed row should collapse when the fan is turned off. Default: true</td>
</tr>
<tr>
<td>ulm_card_fan_horizontal</td>
<td>true</td>
<td>no</td>
<td>Single Line Horizontal Control. Collapsible MUST be false for this currently. Default: false</td>
</tr>
<tr>
<td>ulm_show_button</td>
<td>false</td>
<td>no</td>
<td>Set to false to remove the Button and have a full width Slider. Default: true</td>
</tr>
<tr>
<td>ulm_button_icon</td>
<td>mdi:button</td>
<td>no</td>
<td>Set the icon for the Button. Default: mdi:rotate-3d-variant</td>
</tr>
<tr>
<td>ulm_button_service</td>
<td>fan.toggle</td>
<td>no</td>
<td>Name of the Service Call on button press. Default: fan.oscillate</td>
</tr>
<tr>
<td>oscillate_attribute</td>
<td>oscillate</td>
Expand Down
88 changes: 76 additions & 12 deletions custom_cards/custom_card_saxel_fan/custom_card_saxel_fan.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
### Card Fan ###
custom_card_saxel_fan:
template:
- "custom_card_saxel_fan_common"
Expand Down Expand Up @@ -56,29 +57,92 @@ custom_card_saxel_fan_blue:

# Common template, don't use
custom_card_saxel_fan_common:
template:
- "ulm_translation_engine"
- "ulm_language_variables"
- "icon_info_bg"
variables:
collapsable: true
mainSliderColor:
secondarySliderColor:
ulm_card_fan_horizontal: false
collapsable: true
ulm_card_fan_temp_attribute: "temp"
ulm_card_fan_hum_attribute: "hum"
always_show_attributes: false
ulm_show_button: true
ulm_button_icon: "mdi:rotate-3d-variant"
ulm_button_service: "fan.oscillate"
oscillate_attribute: "oscillate"
template:
- "ulm_translation_engine"
- "icon_info_bg"
hold_action:
action: "more-info"
label: |-
[[[
if (entity.state === 'on') {
return `${entity.attributes.percentage}%`;
if (entity.state != 'unavailable') {
if (variables.ulm_card_fan_slider_temp_attribute != False) {
var temp = Math.round(entity.attributes[variables.ulm_card_fan_temp_attribute]);
let temp_str = ' • ' + (temp ? temp : '0') + '°C';
} else {
let temp_str = ''
}
if (variables.ulm_card_fan_slider_hum_attribute != False) {
var hum = Math.round(entity.attributes[variables.ulm_card_fan_hum_attribute]);
let hum_str = ' • ' + (hum ? hum : '0') + '%';
} else {
let hum_str = ''
}
if (entity.state == 'off') {
if (variables.always_show_attributes == true) {
return variables.ulm_off + temp_str + hum_str
} else {
return variables.ulm_off
}
} else if (entity.state == 'on') {
if (entity.attributes.percentage != null) {
var per = entity.attributes.percentage;
return (per ? per : '0') + '%' + temp_str + hum_str;
} else {
return variables.ulm_on
}
}
} else {
return variables.ulm_translation_state;
return variables.ulm_unavailable;
}
]]]
styles:
grid:
- grid-template-areas: "'i n n' 'i l l' 'slider slider button'"
- grid-template-columns: "min-content 2fr 1fr"
- grid-template-rows: "min-content min-content min-content"
- grid-template-areas: >
[[[
if (!variables.ulm_card_fan_horizontal) {
if (!variables.ulm_show_button) {
return "'i n n slider slider slider' 'i l l . slider slider slider'"
} else {
return "'i n n slider slider button' 'i l l . slider slider button'"
}
} else {
if (!variables.ulm_show_button) {
return "'i n n' 'i l l' 'slider slider slider'"
} else {
return "'i n n' 'i l l' 'slider slider button'"
}
]]]
- grid-template-columns: >
[[[
if (!variables.ulm_card_fan_horizontal) {
return "min-content 2fr 1fr 1fr 1fr 1fr"
} else {
return "min-content 2fr 1fr"
}
]]]
- grid-template-rows: >
[[[
if (!variables.ulm_card_fan_horizontal) {
return "min-content min-content"
} else {
return "min-content min-content min-content"
}
]]]
custom_fields:
slider:
- margin-top: |-
Expand Down Expand Up @@ -133,11 +197,11 @@ custom_card_saxel_fan_common:
state: "[[[ return variables.collapsable ? 'on' : entity.state; ]]]"
card:
type: "custom:button-card"
icon: "mdi:rotate-3d-variant"
icon: "[[[ return variables.ulm_button_icon ]]]"
entity: "[[[ return entity.entity_id ]]]"
tap_action:
action: "call-service"
service: "fan.oscillate"
service: "[[[ return variables.ulm_button_service ]]]"
service_data:
entity_id: "[[[ return entity.entity_id; ]]]"
oscillating: "[[[ return !entity.attributes[variables.oscillate_attribute] ]]]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ ulm_custom_card_schumijo_ca_popup:
browser_mod:
service: "browser_mod.popup"
data:
size: >
[[[
const mediaQuery = window.matchMedia('(max-width: 800px)')
if (mediaQuery.matches) {
return 'fullscreen'
}
]]]
title: "Map"
style:
$: >
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bb2acec

Please sign in to comment.