Skip to content

Commit

Permalink
Merge branch 'UI-Lovelace-Minimalist:main' into tab-view
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss authored May 30, 2022
2 parents 830e956 + 2b3fd06 commit 4c60294
Show file tree
Hide file tree
Showing 70 changed files with 3,175 additions and 521 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"
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: "hora"
ulm_custom_card_damix48_power_details_hours: "horas"
ulm_custom_card_damix48_power_details_in_the_last: "En la última"
ulm_custom_card_damix48_power_details_in_the_lasts: "En las últimas"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "día"
custom_card_eraycetinay_elapsed_time_days: "días"
custom_card_eraycetinay_elapsed_time_hour: "hora"
custom_card_eraycetinay_elapsed_time_hours: "horas"
custom_card_eraycetinay_elapsed_time_minute: "minuto"
custom_card_eraycetinay_elapsed_time_minutes: "minutos"
custom_card_eraycetinay_elapsed_time_ago: "atrás"
custom_card_eraycetinay_elapsed_time_justnow: "justo ahora"
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
9 changes: 9 additions & 0 deletions custom_cards/custom_card_eraycetinay_lock/languages/de.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
ulm_custom_card_eraycetinay_lock_language_variables:
variables:
custom_card_eraycetinay_lock_locked: "verriegelt"
custom_card_eraycetinay_lock_unlocked: "entriegelt"
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_eraycetinay_lock/languages/es.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
ulm_custom_card_eraycetinay_lock_language_variables:
variables:
custom_card_eraycetinay_lock_locked: "bloqueado"
custom_card_eraycetinay_lock_unlocked: "desbloqueado"
custom_card_eraycetinay_lock_locking: "bloqueando"
custom_card_eraycetinay_lock_unlocking: "desbloqueando"
custom_card_eraycetinay_lock_unavailable: "no disponible"
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
9 changes: 9 additions & 0 deletions custom_cards/custom_card_heat_pump/languages/es.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
custom_card_heat_pump_language_variables:
variables:
custom_card_heat_pump_off: "Apagada"
custom_card_heat_pump_dry: "Seco"
custom_card_heat_pump_heat: "Calor"
custom_card_heat_pump_heat_cool: "Automático"
custom_card_heat_pump_cool: "Frío"
custom_card_heat_pump_fan_only: "Sólo ventilador"
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
2 changes: 1 addition & 1 deletion custom_cards/custom_card_homeassistant_updates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ card_homeassistant_updates:
icon: "mdi:cog"
tap_action:
action: "navigate"
navigation_path: "/config/server_control"
navigation_path: "/developer-tools/yaml"

item3:
card:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ card_homeassistant_updates:
icon: "mdi:cog"
tap_action:
action: "navigate"
navigation_path: "/config/server_control"
navigation_path: "/developer-tools/yaml"

item3:
card:
Expand Down
Loading

0 comments on commit 4c60294

Please sign in to comment.