Skip to content

Commit

Permalink
Merge pull request #679 from basbruss/popup
Browse files Browse the repository at this point in the history
[Popup media_player] Design update
  • Loading branch information
basbruss authored May 27, 2022
2 parents 64a1761 + d23c5de commit e430596
Show file tree
Hide file tree
Showing 30 changed files with 776 additions and 78 deletions.
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"
8 changes: 8 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,8 @@
---
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"
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"
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"
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
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ custom_card_irmajavi_speedtest:
custom_fields:
item1:
- justify-self: "end"
- margin-top: "-23px"
- margin-right: "3px"
icon:
- color: "rgba(var(--color-theme),0.9)"
- width: "20px"
Expand All @@ -94,6 +96,8 @@ custom_card_irmajavi_speedtest:
- justify-self: "start"
- font-weight: "bold"
- font-size: "16px"
- margin-left: "40px"
- margin-top: "3px"
grid:
- grid-template-areas: "i n item1"
- grid-template-columns: "min-content"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
### Custom Card More Power Outlet ###
custom_card_more_power_outlet:
template:
- "icon_info_bg"
- "yellow"
- "ulm_language_variables"
variables:
custom_card_more_power_outlet_power_sensor:
custom_card_more_power_outlet_energy_sensor:
custom_card_more_power_outlet_time_sensor:
triggers_update: "all"
label: |-
[[[
if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " +
(states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) {
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) {
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) {
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on") {
return variables.ulm_on;
} else if (entity.state === "off" && variables.custom_card_more_power_outlet_energy_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_energy_sensor].state > 0){
return variables.ulm_off + " • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh";
} else {
return variables.ulm_off;
}
} else if (entity.state === "off") {
return variables.ulm_off;
} else if (entity.state === "unavailable") {
return variables.ulm_unavailable;
} else {
return entity.state;
}
]]]
94 changes: 94 additions & 0 deletions custom_cards/custom_card_more_power_outlet/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: More Power Outlet Card
---
<!-- markdownlint-disable MD046 -->

## Description

<img width="248" alt="image" src="https://user-images.githubusercontent.com/30660751/167216999-2a911d70-0955-410e-a050-ebdcc4c43706.png">

This is the power outlet card is very similar to the default `power-outlet-card` from UI-Minimalist but it is also possible to show two additional sensors - one for total energy and one for time.

## Credits

Author: Wranglatang - 2022 Vesion 1.0.0

## Variables

| Variable | Default | Required | Notes |
|----------|---------|------------------|-------------------|
| entity | | :material-check: | |
|name| | :material-check: | Enable background |
|custom_card_more_power_outlet_power_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the current power consumption (W). |
|custom_card_more_power_outlet_energy_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the energy consumption (kWh) - Typically used with a Daily [Utility Meter](https://www.home-assistant.io/integrations/utility_meter). |
|custom_card_more_power_outlet_time_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the a duration (Mins) - Typically used with the [History Stats](https://www.home-assistant.io/integrations/history_stats). |

## Usage

```yaml
- type: 'custom:button-card'
template: custom_card_more_power_outlet
variables:
custom_card_more_power_outlet_power_sensor: sensor.immersion_heater_power
custom_card_more_power_outlet_energy_sensor: sensor.immersion_heater_energy_daily
custom_card_more_power_outlet_time_sensor: sensor.time_immersion_heater_heating
entity: switch.immersion_heater
name: Immersion Heater
```
## Template code
```yaml
---
### Custom Card More Power Outlet ###
custom_card_more_power_outlet:
template:
- "icon_info_bg"
- "yellow"
- "ulm_language_variables"
variables:
custom_card_more_power_outlet_power_sensor:
custom_card_more_power_outlet_energy_sensor:
custom_card_more_power_outlet_time_sensor:
triggers_update: "all"
label: |-
[[[
if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) {
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) {
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) {
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh";
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) {
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){
return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins";
} else
return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs";
} else if (entity.state === "on") {
return variables.ulm_on;
} else if (entity.state === "off") {
return variables.ulm_off;
} else if (entity.state === "unavailable") {
return variables.ulm_unavailable;
} else {
return entity.state;
}
]]]
```
66 changes: 54 additions & 12 deletions custom_cards/custom_card_nas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ hide:

The `card-nas` shows you a specific sensor value from your NAS, eg. the disk space used.

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

## Credits

Author: tben - 2021
Expand All @@ -20,6 +22,10 @@ Version: 1.0.0
<summary>1.0.0</summary>
Initial release
</details>
<details>
<summary>1.0.1</summary>
Fix card & add Screenshot
</details>

## Usage

Expand Down Expand Up @@ -59,7 +65,7 @@ n/a
<td>The text to show on your card</td>
</tr>
<tr>
<td>ulm_custom_cad_nas_unit</td>
<td>ulm_custom_card_nas_unit</td>
<td>%</td>
<td>yes</td>
<td>The unit to show after your sensors state</td>
Expand All @@ -69,19 +75,55 @@ n/a
## Template code
```yaml
---
custom_card_nas:
tap_action:
action: more-info
template:
- blue
- "blue_no_state"
tap_action:
action: "more-info"
entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]"
show_icon: true
show_label: true
show_name: true
icon: |-
[[[
return "mdi:nas";
]]]
label: |-
[[[
if (entity.state == 'on'){
var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit;
} else {
var state = "Off";
}
return state;
]]]
[[[
return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit;
]]]
name: |-
[[[
return "Nas";
]]]
size: "20px"
styles:
label:
- justify-self: "start"
- align-self: "start"
- font-weight: "bolder"
- font-size: "12px"
- filter: "opacity(40%)"
- margin-left: "12px"
name:
- align-self: "end"
- justify-self: "start"
- font-weight: "bold"
- font-size: "14px"
- margin-left: "12px"
- filter: "opacity(100%)"
img_cell:
- border-radius: "50%"
- place-self: "center"
- width: "42px"
- height: "42px"
grid:
- grid-template-areas: "'i n' 'i l'"
- grid-template-columns: "min-content auto"
- grid-template-rows: "min-content min-content"
card:
- border-radius: "20px"
- box-shadow: "var(--box-shadow)"
- padding: "12px"
```
51 changes: 43 additions & 8 deletions custom_cards/custom_card_nas/custom_card_nas.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,51 @@
---
custom_card_nas:
template:
- "blue_no_state"
tap_action:
action: "more-info"
template:
- "blue"
entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]"
show_icon: true
show_label: true
show_name: true
icon: |-
[[[
return "mdi:nas";
]]]
label: |-
[[[
if (states[variables.ulm_custom_card_nas_sensor].state == 'on'){
var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit;
} else {
var state = "Off";
}
return state;
return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit;
]]]
name: |-
[[[
return "Nas";
]]]
size: "20px"
styles:
label:
- justify-self: "start"
- align-self: "start"
- font-weight: "bolder"
- font-size: "12px"
- filter: "opacity(40%)"
- margin-left: "12px"
name:
- align-self: "end"
- justify-self: "start"
- font-weight: "bold"
- font-size: "14px"
- margin-left: "12px"
- filter: "opacity(100%)"
img_cell:
- border-radius: "50%"
- place-self: "center"
- width: "42px"
- height: "42px"
grid:
- grid-template-areas: "'i n' 'i l'"
- grid-template-columns: "min-content auto"
- grid-template-rows: "min-content min-content"
card:
- border-radius: "20px"
- box-shadow: "var(--box-shadow)"
- padding: "12px"
Loading

0 comments on commit e430596

Please sign in to comment.