Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup media_player rework and small changes #679

Merged
merged 54 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e2b5314
Intial commit of custom_card_more_power_outlet
May 6, 2022
874a936
Update readme.md
wranglatang May 6, 2022
5fc196a
Update readme.md
wranglatang May 6, 2022
4f0d255
Updates to include Hours / Mins Conversion
wranglatang May 6, 2022
12a1f00
Updated template code to include Hours / Minutes
wranglatang May 6, 2022
b2e0de9
Update custom_card_more_power_outlet.yaml
wranglatang May 12, 2022
ecb3485
Create de.yaml
May 14, 2022
7fecd8c
Update Spanish translation
oscfdezdz May 15, 2022
d671742
Fix developer-tools link
Eltarius May 16, 2022
4495d32
Update README.md
Eltarius May 16, 2022
a7770c4
Fix custom_ card
Eltarius May 16, 2022
f147a42
Add screenshot custom_card_nas
Eltarius May 16, 2022
0016a6f
Update README.md
Eltarius May 16, 2022
cd96785
Update README.md
Eltarius May 16, 2022
c0b6cc2
Update README.md
Eltarius May 16, 2022
081f8d8
Update custom_card_nas.yaml
Eltarius May 16, 2022
39dd185
Update custom_card_nas.yaml
Eltarius May 16, 2022
af5b72c
Fix alignment
Eltarius May 17, 2022
36eb4af
Merge pull request #672 from Eltarius/Fix-Speedtest-Card
basbruss May 18, 2022
a2b3bdf
Merge pull request #670 from Eltarius/Fix-custom_card_nas
basbruss May 18, 2022
d5743c1
Merge pull request #669 from Eltarius/Fix-card_homeasssistant_updates
basbruss May 18, 2022
6407161
Update docs
basbruss May 18, 2022
5405f51
Merge pull request #667 from oscfdezdz/es
basbruss May 18, 2022
8fb3c32
Merge pull request #662 from 13robin37/main
basbruss May 18, 2022
3a5f9da
Merge pull request #675 from UI-Lovelace-Minimalist/automated_custom_…
basbruss May 18, 2022
9c4751f
Fix pre-commit
basbruss May 18, 2022
9f59117
Merge pull request #649 from wranglatang/custom_card_more_power_outlet
basbruss May 19, 2022
b13cbd0
Rework mainly media_player popup
basbruss May 19, 2022
4d751ad
adapt dark mode
basbruss May 19, 2022
a65e66e
Full dark mode support
basbruss May 19, 2022
d101fc8
Fix alignment
Eltarius May 17, 2022
f43b825
Fix custom_ card
Eltarius May 16, 2022
99e7584
Add screenshot custom_card_nas
Eltarius May 16, 2022
bce23ff
Update README.md
Eltarius May 16, 2022
bee13c9
Update README.md
Eltarius May 16, 2022
cf93989
Update README.md
Eltarius May 16, 2022
4df6751
Update custom_card_nas.yaml
Eltarius May 16, 2022
bafb92c
Update custom_card_nas.yaml
Eltarius May 16, 2022
33829d6
Fix developer-tools link
Eltarius May 16, 2022
6a91efa
Update README.md
Eltarius May 16, 2022
2de3d59
Update Spanish translation
oscfdezdz May 15, 2022
5af418e
Create de.yaml
May 14, 2022
8829a3b
Update docs
basbruss May 18, 2022
d8aace5
Intial commit of custom_card_more_power_outlet
May 6, 2022
157d586
Update readme.md
wranglatang May 6, 2022
f171fe3
Update readme.md
wranglatang May 6, 2022
1a7cbc3
Updates to include Hours / Mins Conversion
wranglatang May 6, 2022
d046511
Updated template code to include Hours / Minutes
wranglatang May 6, 2022
f294c43
Update custom_card_more_power_outlet.yaml
wranglatang May 12, 2022
0744e40
Fix pre-commit
basbruss May 18, 2022
b5e5666
Rework mainly media_player popup
basbruss May 19, 2022
6096807
adapt dark mode
basbruss May 19, 2022
80b5287
Full dark mode support
basbruss May 19, 2022
d23c5de
Merge branch 'popup' of https://github.com/basbruss/UI into popup
basbruss May 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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