Skip to content

Commit

Permalink
Merge branch 'UI-Lovelace-Minimalist:main' into popup
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss authored May 30, 2022
2 parents 081c299 + 2b3fd06 commit 813181f
Show file tree
Hide file tree
Showing 41 changed files with 2,399 additions and 443 deletions.
71 changes: 71 additions & 0 deletions custom_cards/custom_card_camera/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Custom Camera Card
hide:
- toc
---
<!-- markdownlint-disable MD046 -->

# Custom-card "Camera"

This is a `custom-card` to display a camera live view.

![Screenshot](../../docs/assets/img/screenshot_custom_camera1.png)
![Screenshot](../../docs/assets/img/screenshot_custom_camera2.png)

## Credits

Author: Eltarius, from the script of [Clemalex](https://forum.hacf.fr/t/dashboard-minimalist/5507/183?u=clemalex) - 2022
Version: 1.0.0

## Changelog

<details>
<summary>1.0.0</summary>
Initial release.
</details>

## Usage

```yaml
- type: "custom:button-card"
entity: "camera.sensor"
template: "custom_card_camera"
show_icon: false #True if you set ulm_custom_card_camera_title: true
variables:
ulm_custom_card_camera_title: true
ulm_custom_card_camera_name: "name"
ulm_custom_card_camera_label: "label"
```
## Variables
<table>
<tr>
<th>Variable</th>
<th>Example</th>
<th>Required</th>
<th>Default</th>
<th>Explanation</th>
</tr>
<tr>
<td>ulm_custom_card_camera_title</td>
<td>true</td>
<td>yes</td>
<td></td>
<td>If you want header card</td>
</tr>
<tr>
<td>ulm_custom_card_camera_name</td>
<td>"Garden"</td>
<td>no</td>
<td></td>
<td>Name of your choice</td>
</tr>
<tr>
<td>ulm_custom_card_camera_label</td>
<td>"Room"</td>
<td>no</td>
<td></td>
<td>Label of your choice</td>
</tr>
</table>
74 changes: 74 additions & 0 deletions custom_cards/custom_card_camera/custom_card_camera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
custom_card_camera:
template:
- "blue_no_state"
show_name: false
show_label: false
styles:
card:
- border-radius: "20px"
- box-shadow: "var(--box-shadow)"
- padding: |-
[[[
if(variables.ulm_custom_card_camera_title)
return "12px";
else
return "0px";
]]]
img_cell:
- border-radius: "50%"
- place-self: "center"
- width: "42px"
- height: "42px"
grid:
- grid-template-areas: "'i item1' 'i item1' 'item2 item2'"
- grid-template-columns: "min-content auto"
- grid-template-rows: "min-content min-content min-content"
- row-gap: |-
[[[
if(variables.ulm_custom_card_camera_title)
return "12px";
else
return "0px";
]]]
custom_fields:
item1:
card:
type: "custom:button-card"
show_name: "[[[ return variables.ulm_custom_card_camera_title; ]]]"
show_label: "[[[ return variables.ulm_custom_card_camera_title; ]]]"
show_icon: "[[[ return variables.ulm_custom_card_camera_title; ]]]"
name: "[[[ return variables.ulm_custom_card_camera_name; ]]]"
label: "[[[ return variables.ulm_custom_card_camera_label; ]]]"
styles:
card:
- box-shadow: "none"
- padding: "0"
name:
- align-self: "end"
- justify-self: "start"
- font-weight: "bold"
- font-size: "14px"
- margin-left: "12px"
- filter: "opacity(100%)"
label:
- justify-self: "start"
- align-self: "start"
- font-weight: "bolder"
- font-size: "12px"
- filter: "opacity(40%)"
- margin-left: "12px"
grid:
- grid-template-areas: "'n' 'l'"
- grid-template-columns: "auto"
- grid-template-rows: "min-content min-content"
item2:
card:
type: "picture-entity"
camera_image: "[[[ return entity.entity_id ]]]"
camera_view: "live"
entity: "[[[ return entity.entity_id ]]]"
show_name: false
show_state: false
tap_action:
action: "more-info"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
ulm_custom_card_damix48_power_details_language_variables:
variables:
ulm_custom_card_damix48_power_details_hour: "Stunde"
ulm_custom_card_damix48_power_details_hours: "Stunden"
ulm_custom_card_damix48_power_details_in_the_last: "In der letzten"
ulm_custom_card_damix48_power_details_in_the_lasts: "In den letzten"
38 changes: 28 additions & 10 deletions custom_cards/custom_card_eraycetinay_lock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hide:

# Custom-card "Lock"

This is a `custom-card` that works in switch logic with a `lock` entity. Card structure uses `lock`, `unlock` actions and `lock`,`unlock`,`locking`,`unlocking` states.
This is a `custom-card` that works in switch logic with a `lock` entity. Card structure uses `lock`, `unlock` (optional `open`) actions and `lock`,`unlock`,`locking`,`unlocking`, `jammed` states.

![Generic](../../docs/assets/img/custom_card_eraycetinay_lock_locked.png)
![Generic](../../docs/assets/img/custom_card_eraycetinay_lock_unlocked.png)
Expand All @@ -20,6 +20,8 @@ Version: 0.0.1
## Changelog

<details>
<summary>0.0.2</summary>
Added option to only use lock.open
<summary>0.0.1</summary>
Initial release
</details>
Expand All @@ -33,6 +35,7 @@ Version: 0.0.1
name: "Door Lock"
variables:
ulm_custom_card_eraycetinay_lock_tap_control: true
ulm_custom_card_eraycetinay_lock_open: true
```
## Variables
Expand All @@ -50,6 +53,12 @@ Version: 0.0.1
<td>no</td>
<td>Lock/Unlock on tap action</td>
</tr>
<tr>
<td>ulm_custom_card_eraycetinay_lock_open</td>
<td>true</td>
<td>no</td>
<td>Only use the card to open the door (always sends lock.open on tap)</td>
</tr>
</table>
## Template code
Expand All @@ -74,10 +83,15 @@ custom_card_eraycetinay_lock:
service: |
[[[
if(variables.ulm_custom_card_eraycetinay_lock_tap_control == true){
if (entity.state == "locked"){
return "lock.unlock"
} else if (entity.state == "unlocked"){
return "lock.lock"
if(variables.ulm_custom_card_eraycetinay_lock_open == true){
return "lock.open"
} else {
if (entity.state == "locked"){
return "lock.unlock"
}
} else if (entity.state == "unlocked"){
return "lock.lock"
}
}
} else {
return;
Expand All @@ -98,10 +112,14 @@ custom_card_eraycetinay_lock:
return variables.custom_card_eraycetinay_lock_locked;
} else if (entity.state == "unlocked"){
return variables.custom_card_eraycetinay_lock_unlocked;
} else if (entity.state == "open"){
return variables.ulm_open;
} else if (entity.state == "unlocking"){
return variables.custom_card_eraycetinay_lock_unlocking;
} else if (entity.state == "locking"){
return variables.custom_card_eraycetinay_lock_locking;
} else if (entity.state == "jammed"){
return variables.custom_card_eraycetinay_lock_jammed;
} else {
return entity.state;
}
Expand Down Expand Up @@ -134,9 +152,9 @@ custom_card_eraycetinay_lock:
icon:
- color: "rgba(var(--color-theme),0.2)"
img_cell:
- background-color: "rgba(var(--color-theme),0.05)"
- border-radius: "50%"
- place-self: "center"
- width: "42px"
- height: "42px"
- background-color: "rgba(var(--color-theme),0.05)"
- border-radius: "50%"
- place-self: "center"
- width: "42px"
- height: "42px"
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ custom_card_eraycetinay_lock:
service: |
[[[
if(variables.ulm_custom_card_eraycetinay_lock_tap_control == true){
if (entity.state == "locked"){
return "lock.unlock"
} else if (entity.state == "unlocked"){
return "lock.lock"
if(variables.ulm_custom_card_eraycetinay_lock_open == true){
return "lock.open"
} else {
if (entity.state == "locked"){
return "lock.unlock"
}
} else if (entity.state == "unlocked"){
return "lock.lock"
}
}
} else {
return;
Expand All @@ -41,10 +46,14 @@ custom_card_eraycetinay_lock:
return variables.custom_card_eraycetinay_lock_locked;
} else if (entity.state == "unlocked"){
return variables.custom_card_eraycetinay_lock_unlocked;
} else if (entity.state == "open"){
return variables.ulm_open;
} else if (entity.state == "unlocking"){
return variables.custom_card_eraycetinay_lock_unlocking;
} else if (entity.state == "locking"){
return variables.custom_card_eraycetinay_lock_locking;
} else if (entity.state == "jammed"){
return variables.custom_card_eraycetinay_lock_jammed;
} else {
return entity.state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ulm_custom_card_eraycetinay_lock_language_variables:
custom_card_eraycetinay_lock_locking: "verriegeln"
custom_card_eraycetinay_lock_unlocking: "entriegeln"
custom_card_eraycetinay_lock_unavailable: "nicht verfügbar"
custom_card_eraycetinay_lock_jammed: "blockiert"
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ulm_custom_card_eraycetinay_lock_language_variables:
custom_card_eraycetinay_lock_locking: "locking"
custom_card_eraycetinay_lock_unlocking: "unlocking"
custom_card_eraycetinay_lock_unavailable: "unavailable"
custom_card_eraycetinay_lock_jammed: "jammed"
8 changes: 8 additions & 0 deletions custom_cards/custom_card_heat_pump/languages/de.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
custom_card_heat_pump_language_variables:
variables:
custom_card_heat_pump_dry: "Trocknen"
custom_card_heat_pump_heat: "Heizen"
custom_card_heat_pump_heat_cool: "Auto"
custom_card_heat_pump_cool: "Kühlen"
custom_card_heat_pump_fan_only: "Nur Lüften"
1 change: 0 additions & 1 deletion custom_cards/custom_card_heat_pump/languages/en.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
custom_card_heat_pump_language_variables:
variables:
custom_card_heat_pump_off: "Off"
custom_card_heat_pump_dry: "Dry"
custom_card_heat_pump_heat: "Heat"
custom_card_heat_pump_heat_cool: "Auto"
Expand Down
1 change: 0 additions & 1 deletion custom_cards/custom_card_heat_pump/languages/pl.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
custom_card_heat_pump_language_variables:
variables:
custom_card_heat_pump_off: "Wyłączone"
custom_card_heat_pump_dry: "Osuszanie"
custom_card_heat_pump_heat: "Grzanie"
custom_card_heat_pump_heat_cool: "Automatycznie"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
custom_card_httpedo13_thermostat:
template:
- "ulm_language_variables"
- "custom_card_httpedo13_thermostat_language_variables"
tap_action:
action: "toggle"
icon: |
Expand All @@ -15,11 +14,11 @@ custom_card_httpedo13_thermostat:
label: >-
[[[
if (entity.state =='off') {
return variables.custom_card_httpedo13_thermostat_off;
return variables.ulm_off;
} else if (entity.state =='heat') {
return variables.custom_card_httpedo13_thermostat_on;
return variables.ulm_on;
} else if (entity.attributes.hvac_action == 'heating') {
return variables.custom_card_httpedo13_thermostat_heating;
return variables.ulm_heating;
}
return entity.state;
]]]
Expand Down Expand Up @@ -195,7 +194,6 @@ custom_card_httpedo13_thermostat_with_buttons:
entity_id: "[[[ return variables.entity ]]]"
icon: "mdi:plus"


custom_card_httpedo13_thermostat_with_buttons_collapse:
triggers_update: "all"
styles:
Expand Down Expand Up @@ -330,7 +328,6 @@ custom_card_httpedo13_thermostat_with_buttons_collapse:
entity_id: "[[[ return variables.entity ]]]"
icon: "mdi:plus"


widget_current_temperature:
color: "var(--google-grey-500)"
show_icon: false
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 6 additions & 2 deletions custom_cards/custom_card_input_number/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ The `card_input_number` you can control a input_number entity
## Credits

Author: sildehoop - 2021
Version: 1.0.1
Version: 1.1.0

<h2 style="color: red">Braking changes</h2>

<details style="color: red">
<summary>1.0.1</summary>
<summary>1.1.0</summary>

```yaml
#OLD
Expand All @@ -44,6 +44,10 @@ Version: 1.0.1
## Changelog
<details>
<summary>1.1.0</summary>
Adds ability to work with counter entities. Compatibility with input number entities is not affected.
</details>
<details>
<summary>1.0.1</summary>
Added option to leave ulm_card_input_number_name empty (takes the friendly_name of the entity)
Expand Down
Loading

0 comments on commit 813181f

Please sign in to comment.