From e2b53146f427a67d99148ca9177da08d26ebdead Mon Sep 17 00:00:00 2001 From: pw521312 Date: Fri, 6 May 2022 22:05:54 +0100 Subject: [PATCH 01/46] Intial commit of custom_card_more_power_outlet --- .../custom_card_more_power_outlet.yaml | 45 ++++++++++ .../custom_card_more_power_outlet/readme.md | 86 +++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml create mode 100644 custom_cards/custom_card_more_power_outlet/readme.md diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml new file mode 100644 index 000000000..3d42d79f1 --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -0,0 +1,45 @@ +--- +### 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) { + 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 + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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; + } + ]]] diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md new file mode 100644 index 000000000..07cfe908c --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -0,0 +1,86 @@ +--- +title: More Power Outlet Card +hide: + - toc +--- + + +## Description + +![example-image](../../assets/img/ulm_cards/card_power_outlet.png){ width="500" } + +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. + +## 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) { + 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 + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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; + } + ]]] + +``` From 874a93629d96eee942a96e5d944ba544630e01ec Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 22:14:02 +0100 Subject: [PATCH 02/46] Update readme.md --- custom_cards/custom_card_more_power_outlet/readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index 07cfe908c..ae6f5ece3 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -1,13 +1,11 @@ --- title: More Power Outlet Card -hide: - - toc --- ## Description -![example-image](../../assets/img/ulm_cards/card_power_outlet.png){ width="500" } +image 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. From 5fc196a5af4b3994ab237b99c266e525f74405ab Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 22:21:32 +0100 Subject: [PATCH 03/46] Update readme.md Addition of Credit. --- custom_cards/custom_card_more_power_outlet/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index ae6f5ece3..d44051850 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -9,6 +9,9 @@ title: More Power Outlet Card 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 | From 4f0d255c70b8849e244628cb5a7a9b99d41c8a93 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 23:03:29 +0100 Subject: [PATCH 04/46] Updates to include Hours / Mins Conversion --- .../custom_card_more_power_outlet.yaml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index 3d42d79f1..ff6771d6d 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -13,17 +13,22 @@ custom_card_more_power_outlet: 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) { - 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 + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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"; @@ -31,8 +36,10 @@ custom_card_more_power_outlet: 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) { - return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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") { From 12a1f005b52865efd8999bf249694ae82c449cca Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 23:04:42 +0100 Subject: [PATCH 05/46] Updated template code to include Hours / Minutes --- .../custom_card_more_power_outlet/readme.md | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index d44051850..d76a82868 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -53,17 +53,22 @@ custom_card_more_power_outlet: 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) { - 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 + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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"; @@ -71,8 +76,10 @@ custom_card_more_power_outlet: 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) { - return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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") { @@ -83,5 +90,4 @@ custom_card_more_power_outlet: return entity.state; } ]]] - ``` From b2e0de9a9435c5ddbe7717e7129650c0e63c3afc Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Thu, 12 May 2022 14:55:58 +0100 Subject: [PATCH 06/46] Update custom_card_more_power_outlet.yaml Removed White Space and also added function where the if the sensor has a defined energy sensor which has a value of above 0 - Even if the device is off, this value will show on the card. --- .../custom_card_more_power_outlet.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index ff6771d6d..bed4fa914 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -31,10 +31,8 @@ custom_card_more_power_outlet: 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"; @@ -42,6 +40,12 @@ custom_card_more_power_outlet: 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") { From ecb3485f188c1f7bc25e23a05def669d4ea43cb5 Mon Sep 17 00:00:00 2001 From: 13robin37 Date: Sat, 14 May 2022 09:17:42 +0200 Subject: [PATCH 07/46] Create de.yaml --- .../custom_card_eraycetinay_lock/languages/de.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/de.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml new file mode 100644 index 000000000..8ed2b7f11 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml @@ -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" From 7fecd8c3e7b42df78dd70101b2e1b23730653963 Mon Sep 17 00:00:00 2001 From: oscfdezdz Date: Sun, 15 May 2022 16:34:53 +0200 Subject: [PATCH 08/46] Update Spanish translation --- .../languages/es.yaml | 7 +++ .../languages/es.yaml | 11 +++++ .../languages/es.yaml | 8 ++++ .../custom_card_heat_pump/languages/es.yaml | 9 ++++ .../languages/es.yaml | 8 ++-- .../custom_card_wsly_pollen/languages/ES.yaml | 10 +++++ .../languages/ES.yaml | 9 ++++ .../translations/es.json | 43 +++++++++++++++++++ 8 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 custom_cards/custom_card_damix48_power_details/languages/es.yaml create mode 100644 custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml create mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/es.yaml create mode 100644 custom_cards/custom_card_heat_pump/languages/es.yaml create mode 100644 custom_cards/custom_card_wsly_pollen/languages/ES.yaml create mode 100644 custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml create mode 100644 custom_components/ui_lovelace_minimalist/translations/es.json diff --git a/custom_cards/custom_card_damix48_power_details/languages/es.yaml b/custom_cards/custom_card_damix48_power_details/languages/es.yaml new file mode 100644 index 000000000..9d0d1c749 --- /dev/null +++ b/custom_cards/custom_card_damix48_power_details/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml new file mode 100644 index 000000000..08f72bf65 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml new file mode 100644 index 000000000..38f06f5a2 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_heat_pump/languages/es.yaml b/custom_cards/custom_card_heat_pump/languages/es.yaml new file mode 100644 index 000000000..a027e0df1 --- /dev/null +++ b/custom_cards/custom_card_heat_pump/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_paddy_welcome/languages/es.yaml b/custom_cards/custom_card_paddy_welcome/languages/es.yaml index 8bd843098..499e86cbe 100644 --- a/custom_cards/custom_card_paddy_welcome/languages/es.yaml +++ b/custom_cards/custom_card_paddy_welcome/languages/es.yaml @@ -1,7 +1,7 @@ --- ulm_custom_card_paddy_welcome_language_variables: variables: - ulm_custom_card_paddy_welcome_morning: "Buenos días" - ulm_custom_card_paddy_welcome_afternoon: "Buenas tardes" - ulm_custom_card_paddy_welcome_evening: "Buenas noches" - ulm_custom_card_paddy_welcome_hello: "Hola" + ulm_custom_card_paddy_welcome_morning: "¡Buenos días" + ulm_custom_card_paddy_welcome_afternoon: "¡Buenas tardes" + ulm_custom_card_paddy_welcome_evening: "¡Buenas noches" + ulm_custom_card_paddy_welcome_hello: "¡Hola" diff --git a/custom_cards/custom_card_wsly_pollen/languages/ES.yaml b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml new file mode 100644 index 000000000..d991665cb --- /dev/null +++ b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml @@ -0,0 +1,10 @@ +# ES.yaml for custom_card_wsly_pollen +--- +custom_card_wsly_pollen_language_variables: + variables: + custom_card_wsly_pollen_none: "Ninguno" + custom_card_wsly_pollen_very_low: "Muy bajo" + custom_card_wsly_pollen_low: "Bajo" + custom_card_wsly_pollen_medium: "Medio" + custom_card_wsly_pollen_high: "Alto" + custom_card_wsly_pollen_very_high: "Muy alto" diff --git a/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml new file mode 100644 index 000000000..2a67c870b --- /dev/null +++ b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml @@ -0,0 +1,9 @@ +--- +ulm_custom_card_yagrasdemonde_lights_count_language_variables: + variables: + ulm_custom_card_yagrasdemonde_lights_count_light_0: "Ninguna luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_1: "1 luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_many: "luces encendidas" + ulm_custom_card_yagrasdemonde_lights_count_cover_0: "Ninguna cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_1: "1 cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_many: "cortinas abiertas" diff --git a/custom_components/ui_lovelace_minimalist/translations/es.json b/custom_components/ui_lovelace_minimalist/translations/es.json new file mode 100644 index 000000000..cc3a1677b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/translations/es.json @@ -0,0 +1,43 @@ +{ + "title": "UI Lovelace Minimalist", + "config": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + }, + "options": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + } +} From d671742713150920597785893189880698f8ea79 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Mon, 16 May 2022 20:04:18 +0200 Subject: [PATCH 09/46] Fix developer-tools link --- .../custom_card_homeassistant_updates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml index 71259d383..da3600d2c 100644 --- a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml +++ b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml @@ -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: From 4495d327dad6592609ac6c823f5c308ac6a6d6f3 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Mon, 16 May 2022 20:06:45 +0200 Subject: [PATCH 10/46] Update README.md --- custom_cards/custom_card_homeassistant_updates/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_homeassistant_updates/README.md b/custom_cards/custom_card_homeassistant_updates/README.md index f5ef2d33d..d602f0d18 100644 --- a/custom_cards/custom_card_homeassistant_updates/README.md +++ b/custom_cards/custom_card_homeassistant_updates/README.md @@ -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: From a7770c4c0b86e0a2acd050fa1340fcf44885cb7a Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:20:41 +0200 Subject: [PATCH 11/46] Fix custom_ card --- .../custom_card_nas/custom_card_nas.yaml | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index 30823686c..e1423efd5 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -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" From f147a42df0f2bfb22bb91327ca1d0d9c378fbe1b Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:25:55 +0200 Subject: [PATCH 12/46] Add screenshot custom_card_nas --- docs/assets/img/custom_card_nas.png | Bin 0 -> 3913 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/assets/img/custom_card_nas.png diff --git a/docs/assets/img/custom_card_nas.png b/docs/assets/img/custom_card_nas.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5cc3ad44d0d37b396151a15b6894295a53fe9f GIT binary patch literal 3913 zcmV-P54P}$P)002t}1^@s6sByty00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D4&F&bK~#8N?VVYS zR8<;)|LPXmL7G)|6cJZ&L4pg8(I}`4K_iYa(ePk2qfsYg#Hfj*@x>R3Ml;65WSj>R zKn)Wx!>EBljX>OR7f?a=2D+P_rjf3x?^ON8sY_LL-MY7$V(R~rlY9HFryIWWpL6cH z=O$WOT9Q&G$z=M};1c|G!!SCJNK*S0lGx-njLyZRHjGXtkw|3Law)VuELQzCjFW^f zv91S~g(&JuCC5yDoVx-x_9qxLK{XW zfM@uIcld{g>SQqrO06f8xM1(zy{)=!7$*U|!#_Oqy(~mtsr?gGXnM8{!#FwMU#Vgj zjnrJAXV0D{v|&^Mc!-ZGb|FrXnuE0sO{bVuxecRwz(>5qPic5t^NS`}WP879YsmvM(j`q0EMe^y(qfuaC)X)HZwf?sdT!vGoNI*QVA; zO{&BrtX<6_n|H(~G;l4h$+ZomR>4=_U#Qa+-5BRU6WYp~wk2GIt`uCGdvGtqs5S7_ z7n)^Gq^1f^^*ave1ly8|q^+GG8~5N|+|w{>349Gc+RAyPMWRj~73A957``Jc3fzl( zn%G7yfv>*Mkd+$r8Fdt>2JhI#H7Zx-E=eZ_=Thr)v!>A_I;}fdiQJ^QfGuqG{K_24l6@T){Co^k?QGEp6 z&8dDzL7zic3*?17#le;>TjaIZUd#M+B5%L_wp@1EWiEPOc;SWe&_fT&(W6J*J_ZNe zefQmR{`u#-{nMvUmkk>>xP69E39^s0qEbylD{>5TTh(&6~a#t&H#QHRb(ixVL&WW^KwSD5?9`yd+s^6eE#|8 z-BLkvs^0?!43PKUdrw|}{q@YAG(_cBUwu`^j~_4V)~%BlUU)%nz4g}2Uc-o=$Wk-d zBkUur1^-USi~p!AD=l0aF7lGMI0mFlo;+D@x#bquY3B3UXP>#{_19l7W58#*G`@BQwLO1d*lYedsW(+mMjutLtR_#)M0o zw=*J!27brsP)g2atLoe}!Vor(g`mC6jE+7dMvQRF1q&89fggF~5%)6;8Z=0L{`qGY zy`O#dS=WP(=ybeM02oFkh%9xvqqkn1drYpI+%Ch1B<0V4YL`D=mvo8s8GlHx-#aTQ zv!|!mS-tz)7Yq)V4BZogr~O`@r(DXH&L^LdY9<3=T=f4`)xO&v2JbEk%} zFZZ^~xG|**&g?0phm}_#7)G^2=PT12={wbtBQ;YHmBY$4b<&iQSZPT~tB;?kW^ZXs zuY*Wwv9u4DEAhOhkVN@59rDoR8YUfnQ zqhZ8FbgAQ+D5avD3VAe)xQN{Qy=`YA)VOc${Z__~NW!w+2q;>8ZmrzG9CZ=Wn( zy3`FD<@$$HRS*8&3`p_ed|u!D_S5e7zw{dG=zS&4JQK;A0xxgM&f zh;Y$G7s=IEUoE?K?Q&zg4;(n)L}v^*k%=Y^KLgcOe!k#>3v%S~p>XAR1YmR;|5%@V z@=0c|xa(7>AOZyp_iSrxbLTKh?S>m}aQD`#F@*w>4r3OBQQ>|1gZ~i0)g9i_m88c?c zrI%jnCPAR)LnJ!utg~dym@)1v3P{x4-0Y5Jb`(-R=-beVD-aGznJq;jVsq}4DN~&A zjg5^?q}j7)%gs06?5e*+f38F1BZ5+Tb3Dg_agbvBe2CH%Fz1|ePG-w-sFKq>LFk1G7rI3BH^LK()O^p19_DI;JeB*c zEv-hXG(a0zAyO0Nn5Kv*h&;@GLc0doM)W2TLG?d8k*XL(ykWzJxrr3CDoxuxAGAY} zgosT0o1Wu4@4V9$HVTsH%OyZGq_3b*KJyhiL|A@z3bG)@_WAJlp*>%y`p(~uyb$#% z)JPOmMtEY88u(aUwGkyxbQ;k{CA!eTL_!E8p}os1m5UcIcI|2+A#zawP<>=wJF@ss zN+%T(H8eE1>at!hABf6zY2On4Q~-^v$icZQSFUsg03vHs0J%18+T=Q#6eJ>F98aFO zF8L~!&mhGjY@vPJkC|c=+Vzm{8swRRh`$fl0$m#6iA`!EVl{~!^^2JN=O$9pKIO3s z37MG;0eFOiFkgJ}h3i3PA00eM&m$TnWC8`Gr`-rlX+(RLYZaP!kn`!dqC*S0Y2#jb z<&|04IG<`MBG7*3Q4sHK)1yr_oqJLk0QVq*@~oYR$|EB>s4ltWlA`(aDHdUi?W0GQ z>NIc<^6Ynz`Ot&U?+nbk`sJ5jy1y&yMtC9*J_*9d>Q46D-`!IGzeWzNzM4Z+c%%gk z+As_y_Q5AX1`kMve#8|g+?zZYMy*m8Y`gd!L*>Betsw)s#>o&X>F#YK$c$Pc=qo-a znwy)Gj3m?QHyuRzI!nUBWPg0DuCu|w(BN<(KF6YVoEH`5H$oYzSLnSzKn_;_WK zs&%)n)@C*gAB5(e0)`T6Cz%txrKQCUKG6Xv)X|aLW}q;P>V`olNX%%y?7$Npe4^o- z#75+W!AniF&$EyFOX1AN3w?HE&MeR8Vbpa*dhiCHw_9FSrdMtR^N zKB}9((CRPbD6S!#11SZVB!H8d9KggjjFSic;UPZarQeqJg@%Gslk@^Cc`3ipq;!U1 zR1UnuKi@}nG@sP&Idx_|3ypA|TQeYq#0(mg6m+38!v`sNA;U1@1rM2jj)cfOkJc#d zN9rI2rPkz&P10v$Org^mqs|PY79lz_RTRNhBeXBHM(C2IhJ0cpw2IBolpG8x)rt2E z!zdqIW9CR;sA^ysM%pd)iOETr z#F2>_Ra_DxtIYVsvLm6PsMNsCfeiRbDk>=`x4-Tm=M((dFlvpUj4HLttl|b`_Kz!tlBEU}lO+=S%iuOW&M=G Date: Tue, 17 May 2022 00:26:59 +0200 Subject: [PATCH 13/46] Update README.md --- custom_cards/custom_card_nas/README.md | 62 +++++++++++++++++++++----- 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 25bc874aa..4cf3246e6 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -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 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -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" ``` From cd967854f50ba2907f3490d9b16f4edef09a459d Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:35:13 +0200 Subject: [PATCH 14/46] Update README.md --- custom_cards/custom_card_nas/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 4cf3246e6..13ea25852 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -90,9 +90,9 @@ custom_card_nas: return "mdi:nas"; ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] name: |- [[[ return "Nas"; From c0b6cc27769abe12ceae892208a483a40de78d6a Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:39:00 +0200 Subject: [PATCH 15/46] Update README.md --- custom_cards/custom_card_nas/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 13ea25852..f59ad2701 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -94,7 +94,7 @@ custom_card_nas: 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" From 081f8d8cda5219a6028dc40c86541560a4a70b4c Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:39:27 +0200 Subject: [PATCH 16/46] Update custom_card_nas.yaml --- custom_cards/custom_card_nas/custom_card_nas.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index e1423efd5..b3a1bf764 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -13,11 +13,11 @@ custom_card_nas: return "mdi:nas"; ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + 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" From 39dd185d23b826ff9960ec9bbe30e0fda3aeb86f Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:45:37 +0200 Subject: [PATCH 17/46] Update custom_card_nas.yaml --- .../custom_card_nas/custom_card_nas.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index b3a1bf764..fc90957ba 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -9,17 +9,17 @@ custom_card_nas: show_label: true show_name: true icon: |- - [[[ - return "mdi:nas"; - ]]] + [[[ + return "mdi:nas"; + ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] name: |- - [[[ - return "Nas"; - ]]] + [[[ + return "Nas"; + ]]] size: "20px" styles: label: From af5b72c0f00e839272e2950b2a5a061b42f6ae1f Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 23:32:57 +0200 Subject: [PATCH 18/46] Fix alignment Fix alignment text and the chevron icon --- .../custom_card_irmajavi_speedtest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml index d409e4e81..181fe80f2 100644 --- a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml +++ b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml @@ -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" @@ -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" From 640716199b28f8139930e7dc3f49a7b8af021fcc Mon Sep 17 00:00:00 2001 From: basbruss Date: Wed, 18 May 2022 17:36:25 +0000 Subject: [PATCH 19/46] Update docs --- .../custom_card_homeassistant_updates.md | 2 +- docs/usage/custom_cards/custom_card_nas.md | 66 +++++++++++++++---- 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/docs/usage/custom_cards/custom_card_homeassistant_updates.md b/docs/usage/custom_cards/custom_card_homeassistant_updates.md index 7d48be8a6..6240f62d5 100644 --- a/docs/usage/custom_cards/custom_card_homeassistant_updates.md +++ b/docs/usage/custom_cards/custom_card_homeassistant_updates.md @@ -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: diff --git a/docs/usage/custom_cards/custom_card_nas.md b/docs/usage/custom_cards/custom_card_nas.md index 25bc874aa..7ae6a88c3 100644 --- a/docs/usage/custom_cards/custom_card_nas.md +++ b/docs/usage/custom_cards/custom_card_nas.md @@ -9,6 +9,8 @@ hide: The `card-nas` shows you a specific sensor value from your NAS, eg. the disk space used. +![Screenshot](../../assets/img/custom_card_nas.png) + ## Credits Author: tben - 2021 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -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" ``` From 9c4751f443cb2ef15b17a422aa5c39b978ecb5c2 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Wed, 18 May 2022 23:20:43 +0200 Subject: [PATCH 20/46] Fix pre-commit --- .../custom_card_more_power_outlet.yaml | 3 ++- custom_cards/custom_card_more_power_outlet/readme.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index bed4fa914..1bc5651e8 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -14,7 +14,8 @@ custom_card_more_power_outlet: [[[ 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"; + 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) { diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index d76a82868..819124663 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -10,6 +10,7 @@ title: More Power Outlet Card 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 @@ -19,8 +20,8 @@ Author: Wranglatang - 2022 Vesion 1.0.0 | 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]. | +|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 From b13cbd0ddd0e161dcf0cc92f027faba7ffe09501 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 19:07:02 +0200 Subject: [PATCH 21/46] Rework mainly media_player popup --- .../popup_buttons/popup_button.yaml | 2 + .../popup_buttons/popup_button_app.yaml | 118 +++++++++++++++++ .../popup_buttons/popup_button_source.yaml | 15 +++ .../popup_buttons/popup_button_volume.yaml | 14 +- .../popup_buttons/popup_card_volume.yaml | 15 +++ .../popup_buttons/popup_chip_controls.yaml | 76 +++++++++++ .../popup_buttons/popup_chip_volume.yaml | 23 ++++ .../popup_buttons/popup_header.yaml | 2 + .../popup_layouts/popup_list_items.yaml | 5 + .../popups/popup_light_brightness.yaml | 1 - .../popups/popup_media_player_infos.yaml | 120 ++++++++++++------ 11 files changed, 352 insertions(+), 39 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml index 0ba7ce89c..e0638b80d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml @@ -11,6 +11,8 @@ popup_button: card: - background: "none" - box-shadow: "none" + - border-radius: "none" + - padding: "12px" icon: - color: "var(--primary-color)" img_cell: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml new file mode 100644 index 000000000..fa055c76b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -0,0 +1,118 @@ +--- +popup_button_app: + template: + - "popup_button" + show_name: true + show_label: true + styles: + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + 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" + - margin-top: "0px" + icon: + - color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "#1DB954"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "#1DB954"; + } + return color; + ]]] + img_cell: + - border: "1px solid var(--color-theme)" + - border-shadow: "none" + - background-color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "var(--primary-color)"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "var(--primary-color)"; + } + return color; + ]]] + icon: > + [[[ + var icon = entity.attributes.icon || "mdi:speaker"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var icon = "mdi:spotify"; + } else if(app == "google podcasts"){ + var icon = "mdi:google-podcast"; + } else if(app == "plex"){ + var icon = "mdi:plex"; + } else if(app == "soundcloud"){ + var icon = "mdi:soundcloud"; + } else if(app == "youtube music"){ + var icon = "mdi:youtube"; + } else if (app == "oto music"){ + var icon = "mdi:music-circle"; + } else if(app == "pandora"){ + var icon = "mdi:pandora"; + } else if(app == "netflix"){ + var icon = "mdi:netflix"; + } else if(app == "bluetooth audio"){ + var icon = "mdi:bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var icon = "mdi:spotify"; + } + return icon; + ]]] + label: > + [[[ + var label = entity.attributes.media_title || entity.attributes.friendly_name; + return label; + ]]] + name: > + [[[ + var name = entity.attributes.friendly_name; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var name = "Spotify"; + } else if(app == "google podcasts"){ + var name = "Google-Podcast"; + } else if(app == "plex"){ + var name = "Plex"; + } else if(app == "soundcloud"){ + var name = "Soundcloud"; + } else if(app == "youtube music"){ + var name = "Youtube"; + } else if (app == "oto music"){ + var name = "Oto Music"; + } else if(app == "pandora"){ + var name = "Pandora"; + } else if(app == "netflix"){ + var name = "Netflix"; + } else if(app == "bluetooth audio"){ + var name = "Bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var name = "Spotify"; + } + return name; + ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml new file mode 100644 index 000000000..a43106542 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml @@ -0,0 +1,15 @@ +--- +popup_button_source: + template: + - "popup_button" + - "ulm_language_variables" + icon: "mdi:playlist-music" + name: "Source" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml index bdc7d8620..27054bd4a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml @@ -1,5 +1,17 @@ --- popup_button_volume: - template: "ulm_language_variables" + template: + - "popup_button" + - "ulm_language_variables" icon: "mdi:volume-high" name: "Volume" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + tap_action: + action: "more_info" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml new file mode 100644 index 000000000..1f548c7b9 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml @@ -0,0 +1,15 @@ +--- +popup_card_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: "80%" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml new file mode 100644 index 000000000..99d97e7a7 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml @@ -0,0 +1,76 @@ +--- +popup_chip_controls: + template: "chips" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "item1 item2 item3" + - justify-content: "space-evenly" + - display: "flex" + - grid-template-columns: "min-content min-content min-content" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-previous" + tap_action: + action: "call-service" + service: "media_player.media_previous_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.25)" + item2: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:play" + state: + - value: "playing" + icon: "mdi:pause" + tap_action: + action: "call-service" + service: "media_player.media_play_pause" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + item3: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-next" + tap_action: + action: "call-service" + service: "media_player.media_next_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.25)" + +icon_controls: + show_icon: true + show_label: false + show_name: false + show_state: false + styles: + card: + - background: "none" + - box-shadow: "none" + - height: "42px" + grid: + - grid-template-areas: "'i'" + img_cell: + - width: "30px" + size: "80%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml new file mode 100644 index 000000000..c0280a244 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml @@ -0,0 +1,23 @@ +--- +popup_chip_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: > + [[[ + let level = entity.attributes.volume_level + return level * 100 + '%' + ]]] + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" + img_cell: + - width: "30px" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml index 03484ba24..04db54a4f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml @@ -15,6 +15,8 @@ popup_header: - font-weight: "bold" - font-size: "12px" - filter: "opacity(40%)" + name: + - margin-top: "6px" icon: - color: "var(--color-theme)" label: |- diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml index 840f48f63..42c111946 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml @@ -4,3 +4,8 @@ popup_list_items: styles: card: - background: "none" + - border-radius: "none" + grid: + - grid-template-areas: "'item1 item2 item3'" + - justify-content: "space-evenly" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml index 0a1abfd11..ff8414935 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml @@ -37,7 +37,6 @@ popup_light_brightness: } return columns.join(" "); ]]] - - column-gap: "30px" card: - background: "var(--primary-background-color)" - box-shadow: "none" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index 607ec7438..d4650395a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -1,15 +1,17 @@ --- popup_media_player_infos: + triggers_update: "all" styles: grid: - - grid-template-areas: "'header header' 'content1 content2' 'footer footer'" - - grid-template-rows: "16vh 56vh 14vh" - - grid-template-columns: "1fr 1fr" - - column-gap: "30px" + - grid-template-areas: "'header' 'content1' 'footer'" + - grid-template-rows: "14vh 56vh 16vh" + - row-gap: "2.5%" card: - background: "var(--primary-background-color)" - box-shadow: "none" - padding: "4%" + - border-radius: "none" + - height: "100vh" custom_fields: header: - align-self: "start" @@ -22,17 +24,18 @@ popup_media_player_infos: - max-width: "400px" - justify-self: "center" content2: - - align-self: "center" + - display: "none" buttons: - display: "none" footer: - align-self: "end" - margin-top: "25px" + - padding-bottom: "4%" extra_styles: | @media (max-width: 800px) { #container { - grid-template-areas: "header" "content1" "buttons" "footer" !important; - grid-template-rows: 16vh 52vh 14vh 14vh !important; + grid-template-areas: "header" "content1" "footer" !important; + grid-template-rows: 14vh 56vh 16vh !important; grid-template-columns: 1fr !important; } #buttons { @@ -52,14 +55,26 @@ popup_media_player_infos: content1: card: type: "custom:button-card" + show_icon: false + show_name: false + show_label: false styles: grid: - - grid-template-areas: "'picture' 'media' 'control'" + - grid-template-areas: "'app' 'picture' 'media' 'control' 'bar'" card: - - background: "none" + - background-blend-mode: "soft-light" + - background: | + [[[ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' + : '' + ]]] - box-shadow: "none" - - padding: "4%" + - padding: "1%" custom_fields: + app: + - justify-self: "start" + - align-self: "start" picture: - margin-left: "auto" - margin-right: "auto" @@ -73,7 +88,17 @@ popup_media_player_infos: control: - background: "none" - box-shadow: "none" + bar: + - align-self: "start" + - background: "none" + - box-shadow: "none" + - margin-bottom: "12px" custom_fields: + app: + card: + type: "custom:button-card" + template: "popup_button_app" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" picture: card: type: "custom:mini-media-player" @@ -132,6 +157,7 @@ popup_media_player_infos: type: "custom:mini-media-player" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" hide: + controls: true icon: true name: true info: true @@ -145,43 +171,58 @@ popup_media_player_infos: background: none !important; box-shadow: none !important; width: 50% !important; - margin-left: auto !important; - margin-right: auto !important; + margin-left: 6px !important; + margin-right: 6px !important; } .mmp__bg{ background: none !important; } - buttons: - card: - type: "custom:button-card" - template: "list_2_items" - styles: - card: - - background: "none" - custom_fields: - item1: - card: - type: "custom:button-card" - template: - - "popup_button" - - "popup_button_selected" - - "popup_button_playing" - item2: + bar: card: type: "custom:button-card" - template: - - "popup_button" - - "popup_button_volume" - tap_action: - action: "fire-dom-event" - browser_mod: - command: "popup" - hide_header: true + template: "list_2_items" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + grid: + - display: "flex" + - justify-content: "center" + custom_fields: + item1: card: type: "custom:button-card" - template: "popup_media_player_volume" + template: "popup_chip_controls" variables: ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + item2: + card: + type: "custom:button-card" + template: "popup_chip_volume" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0" + tap_action: + action: "fire-dom-event" + browser_mod: + command: "popup" + hide_header: true + card: + type: "custom:button-card" + template: "popup_media_player_volume" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" footer: card: type: "custom:button-card" @@ -196,6 +237,11 @@ popup_media_player_infos: type: "custom:button-card" template: "popup_button_power" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + item3: + card: + type: "custom:button-card" + template: "popup_button_source" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" content2: card: type: "custom:my-slider" From 4d751ad615818312d7a00433f7b6f0ea93157cae Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 19:33:20 +0200 Subject: [PATCH 22/46] adapt dark mode --- .../popup_templates/popup_buttons/popup_button_app.yaml | 3 ++- .../popup_templates/popup_buttons/popup_chip_controls.yaml | 6 +++--- .../popup_templates/popups/popup_media_player_infos.yaml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml index fa055c76b..e5160c6bf 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -16,6 +16,7 @@ popup_button_app: - font-size: "12px" - filter: "opacity(40%)" - margin-left: "12px" + - color: "#212121" name: - align-self: "end" - justify-self: "start" @@ -26,7 +27,7 @@ popup_button_app: icon: - color: > [[[ - var color = "var(--color-theme)"; + var color = "51,51,51"; if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml index 99d97e7a7..a0a33b42d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml @@ -7,7 +7,7 @@ popup_chip_controls: card: - background: "none" - box-shadow: "none" - - border: "1px solid rgba(var(--color-theme),0.25)" + - border: "1px solid rgba(var(--color-theme),0.5)" - height: "42px" - border-radius: "21px" grid: @@ -29,7 +29,7 @@ popup_chip_controls: entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" styles: icon: - - color: "rgba(var(--color-theme),0.25)" + - color: "rgba(var(--color-theme),0.5)" item2: card: type: "custom:button-card" @@ -57,7 +57,7 @@ popup_chip_controls: entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" styles: icon: - - color: "rgba(var(--color-theme),0.25)" + - color: "rgba(var(--color-theme),0.5)" icon_controls: show_icon: true diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index d4650395a..c71cd27e4 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -147,7 +147,7 @@ popup_media_player_infos: .entity__info__media { font-weight: bold !important; font-size: 14px !important; - color: var(--primary-text-color) !important; + color: "#212121" !important; } :host { --paper-progress-active-color: blue !important; From a65e66e9cf099342f2116954051951bb97d8d9ee Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 23:34:28 +0200 Subject: [PATCH 23/46] Full dark mode support --- .../popup_buttons/popup_button_app.yaml | 7 +++---- .../popups/popup_media_player_infos.yaml | 14 ++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml index e5160c6bf..6933d9fd6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -16,7 +16,6 @@ popup_button_app: - font-size: "12px" - filter: "opacity(40%)" - margin-left: "12px" - - color: "#212121" name: - align-self: "end" - justify-self: "start" @@ -27,7 +26,7 @@ popup_button_app: icon: - color: > [[[ - var color = "51,51,51"; + var color = "var(--color-theme)"; if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ @@ -47,10 +46,10 @@ popup_button_app: if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ - color = "var(--primary-color)"; + color = "#434343"; } } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ - var color = "var(--primary-color)"; + var color = "#434343"; } return color; ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index c71cd27e4..76b3e4e1a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -65,9 +65,15 @@ popup_media_player_infos: - background-blend-mode: "soft-light" - background: | [[[ - return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null - ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' - : '' + if(hass.themes.darkMode){ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, #333333 90%, grey 105% ,#333333 110%)' + : '' + }else{ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' + : '' + } ]]] - box-shadow: "none" - padding: "1%" @@ -147,7 +153,7 @@ popup_media_player_infos: .entity__info__media { font-weight: bold !important; font-size: 14px !important; - color: "#212121" !important; + color: var(--primary-text-color) !important; } :host { --paper-progress-active-color: blue !important; From d101fc8a5daa273722e7006715135d9ab3442fda Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 23:32:57 +0200 Subject: [PATCH 24/46] Fix alignment Fix alignment text and the chevron icon --- .../custom_card_irmajavi_speedtest.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml index d409e4e81..181fe80f2 100644 --- a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml +++ b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml @@ -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" @@ -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" From f43b825ec97de3948897f94e86a62e6f578a39b3 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:20:41 +0200 Subject: [PATCH 25/46] Fix custom_ card --- .../custom_card_nas/custom_card_nas.yaml | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index 30823686c..e1423efd5 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -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" From 99e75840cdbd20f1018ea9b0ce788a3bc4d13fb7 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:25:55 +0200 Subject: [PATCH 26/46] Add screenshot custom_card_nas --- docs/assets/img/custom_card_nas.png | Bin 0 -> 3913 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/assets/img/custom_card_nas.png diff --git a/docs/assets/img/custom_card_nas.png b/docs/assets/img/custom_card_nas.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5cc3ad44d0d37b396151a15b6894295a53fe9f GIT binary patch literal 3913 zcmV-P54P}$P)002t}1^@s6sByty00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D4&F&bK~#8N?VVYS zR8<;)|LPXmL7G)|6cJZ&L4pg8(I}`4K_iYa(ePk2qfsYg#Hfj*@x>R3Ml;65WSj>R zKn)Wx!>EBljX>OR7f?a=2D+P_rjf3x?^ON8sY_LL-MY7$V(R~rlY9HFryIWWpL6cH z=O$WOT9Q&G$z=M};1c|G!!SCJNK*S0lGx-njLyZRHjGXtkw|3Law)VuELQzCjFW^f zv91S~g(&JuCC5yDoVx-x_9qxLK{XW zfM@uIcld{g>SQqrO06f8xM1(zy{)=!7$*U|!#_Oqy(~mtsr?gGXnM8{!#FwMU#Vgj zjnrJAXV0D{v|&^Mc!-ZGb|FrXnuE0sO{bVuxecRwz(>5qPic5t^NS`}WP879YsmvM(j`q0EMe^y(qfuaC)X)HZwf?sdT!vGoNI*QVA; zO{&BrtX<6_n|H(~G;l4h$+ZomR>4=_U#Qa+-5BRU6WYp~wk2GIt`uCGdvGtqs5S7_ z7n)^Gq^1f^^*ave1ly8|q^+GG8~5N|+|w{>349Gc+RAyPMWRj~73A957``Jc3fzl( zn%G7yfv>*Mkd+$r8Fdt>2JhI#H7Zx-E=eZ_=Thr)v!>A_I;}fdiQJ^QfGuqG{K_24l6@T){Co^k?QGEp6 z&8dDzL7zic3*?17#le;>TjaIZUd#M+B5%L_wp@1EWiEPOc;SWe&_fT&(W6J*J_ZNe zefQmR{`u#-{nMvUmkk>>xP69E39^s0qEbylD{>5TTh(&6~a#t&H#QHRb(ixVL&WW^KwSD5?9`yd+s^6eE#|8 z-BLkvs^0?!43PKUdrw|}{q@YAG(_cBUwu`^j~_4V)~%BlUU)%nz4g}2Uc-o=$Wk-d zBkUur1^-USi~p!AD=l0aF7lGMI0mFlo;+D@x#bquY3B3UXP>#{_19l7W58#*G`@BQwLO1d*lYedsW(+mMjutLtR_#)M0o zw=*J!27brsP)g2atLoe}!Vor(g`mC6jE+7dMvQRF1q&89fggF~5%)6;8Z=0L{`qGY zy`O#dS=WP(=ybeM02oFkh%9xvqqkn1drYpI+%Ch1B<0V4YL`D=mvo8s8GlHx-#aTQ zv!|!mS-tz)7Yq)V4BZogr~O`@r(DXH&L^LdY9<3=T=f4`)xO&v2JbEk%} zFZZ^~xG|**&g?0phm}_#7)G^2=PT12={wbtBQ;YHmBY$4b<&iQSZPT~tB;?kW^ZXs zuY*Wwv9u4DEAhOhkVN@59rDoR8YUfnQ zqhZ8FbgAQ+D5avD3VAe)xQN{Qy=`YA)VOc${Z__~NW!w+2q;>8ZmrzG9CZ=Wn( zy3`FD<@$$HRS*8&3`p_ed|u!D_S5e7zw{dG=zS&4JQK;A0xxgM&f zh;Y$G7s=IEUoE?K?Q&zg4;(n)L}v^*k%=Y^KLgcOe!k#>3v%S~p>XAR1YmR;|5%@V z@=0c|xa(7>AOZyp_iSrxbLTKh?S>m}aQD`#F@*w>4r3OBQQ>|1gZ~i0)g9i_m88c?c zrI%jnCPAR)LnJ!utg~dym@)1v3P{x4-0Y5Jb`(-R=-beVD-aGznJq;jVsq}4DN~&A zjg5^?q}j7)%gs06?5e*+f38F1BZ5+Tb3Dg_agbvBe2CH%Fz1|ePG-w-sFKq>LFk1G7rI3BH^LK()O^p19_DI;JeB*c zEv-hXG(a0zAyO0Nn5Kv*h&;@GLc0doM)W2TLG?d8k*XL(ykWzJxrr3CDoxuxAGAY} zgosT0o1Wu4@4V9$HVTsH%OyZGq_3b*KJyhiL|A@z3bG)@_WAJlp*>%y`p(~uyb$#% z)JPOmMtEY88u(aUwGkyxbQ;k{CA!eTL_!E8p}os1m5UcIcI|2+A#zawP<>=wJF@ss zN+%T(H8eE1>at!hABf6zY2On4Q~-^v$icZQSFUsg03vHs0J%18+T=Q#6eJ>F98aFO zF8L~!&mhGjY@vPJkC|c=+Vzm{8swRRh`$fl0$m#6iA`!EVl{~!^^2JN=O$9pKIO3s z37MG;0eFOiFkgJ}h3i3PA00eM&m$TnWC8`Gr`-rlX+(RLYZaP!kn`!dqC*S0Y2#jb z<&|04IG<`MBG7*3Q4sHK)1yr_oqJLk0QVq*@~oYR$|EB>s4ltWlA`(aDHdUi?W0GQ z>NIc<^6Ynz`Ot&U?+nbk`sJ5jy1y&yMtC9*J_*9d>Q46D-`!IGzeWzNzM4Z+c%%gk z+As_y_Q5AX1`kMve#8|g+?zZYMy*m8Y`gd!L*>Betsw)s#>o&X>F#YK$c$Pc=qo-a znwy)Gj3m?QHyuRzI!nUBWPg0DuCu|w(BN<(KF6YVoEH`5H$oYzSLnSzKn_;_WK zs&%)n)@C*gAB5(e0)`T6Cz%txrKQCUKG6Xv)X|aLW}q;P>V`olNX%%y?7$Npe4^o- z#75+W!AniF&$EyFOX1AN3w?HE&MeR8Vbpa*dhiCHw_9FSrdMtR^N zKB}9((CRPbD6S!#11SZVB!H8d9KggjjFSic;UPZarQeqJg@%Gslk@^Cc`3ipq;!U1 zR1UnuKi@}nG@sP&Idx_|3ypA|TQeYq#0(mg6m+38!v`sNA;U1@1rM2jj)cfOkJc#d zN9rI2rPkz&P10v$Org^mqs|PY79lz_RTRNhBeXBHM(C2IhJ0cpw2IBolpG8x)rt2E z!zdqIW9CR;sA^ysM%pd)iOETr z#F2>_Ra_DxtIYVsvLm6PsMNsCfeiRbDk>=`x4-Tm=M((dFlvpUj4HLttl|b`_Kz!tlBEU}lO+=S%iuOW&M=G Date: Tue, 17 May 2022 00:26:59 +0200 Subject: [PATCH 27/46] Update README.md --- custom_cards/custom_card_nas/README.md | 62 +++++++++++++++++++++----- 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 25bc874aa..4cf3246e6 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -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 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -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" ``` From bee13c9515be907415fe9de7628e799a7fc1824a Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:35:13 +0200 Subject: [PATCH 28/46] Update README.md --- custom_cards/custom_card_nas/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 4cf3246e6..13ea25852 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -90,9 +90,9 @@ custom_card_nas: return "mdi:nas"; ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] name: |- [[[ return "Nas"; From cf939891ba1b1c3197c7365143abeab754714831 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:39:00 +0200 Subject: [PATCH 29/46] Update README.md --- custom_cards/custom_card_nas/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 13ea25852..f59ad2701 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -94,7 +94,7 @@ custom_card_nas: 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" From 4df6751466531240e5853c4cf052a46f07816255 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:39:27 +0200 Subject: [PATCH 30/46] Update custom_card_nas.yaml --- custom_cards/custom_card_nas/custom_card_nas.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index e1423efd5..b3a1bf764 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -13,11 +13,11 @@ custom_card_nas: return "mdi:nas"; ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + 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" From bafb92cd26212d811c615f714fadf3df40509c93 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Tue, 17 May 2022 00:45:37 +0200 Subject: [PATCH 31/46] Update custom_card_nas.yaml --- .../custom_card_nas/custom_card_nas.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index b3a1bf764..fc90957ba 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -9,17 +9,17 @@ custom_card_nas: show_label: true show_name: true icon: |- - [[[ - return "mdi:nas"; - ]]] + [[[ + return "mdi:nas"; + ]]] label: |- - [[[ - return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] name: |- - [[[ - return "Nas"; - ]]] + [[[ + return "Nas"; + ]]] size: "20px" styles: label: From 33829d6e4293f179ac211e640a94a3a53d573208 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Mon, 16 May 2022 20:04:18 +0200 Subject: [PATCH 32/46] Fix developer-tools link --- .../custom_card_homeassistant_updates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml index 71259d383..da3600d2c 100644 --- a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml +++ b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml @@ -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: From 6a91efa2bf36d703c666d425e192ac66a1f3abb0 Mon Sep 17 00:00:00 2001 From: Eltarius Date: Mon, 16 May 2022 20:06:45 +0200 Subject: [PATCH 33/46] Update README.md --- custom_cards/custom_card_homeassistant_updates/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_homeassistant_updates/README.md b/custom_cards/custom_card_homeassistant_updates/README.md index f5ef2d33d..d602f0d18 100644 --- a/custom_cards/custom_card_homeassistant_updates/README.md +++ b/custom_cards/custom_card_homeassistant_updates/README.md @@ -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: From 2de3d59b796543dfc23af351dac256199470250d Mon Sep 17 00:00:00 2001 From: oscfdezdz Date: Sun, 15 May 2022 16:34:53 +0200 Subject: [PATCH 34/46] Update Spanish translation --- .../languages/es.yaml | 7 +++ .../languages/es.yaml | 11 +++++ .../languages/es.yaml | 8 ++++ .../custom_card_heat_pump/languages/es.yaml | 9 ++++ .../languages/es.yaml | 8 ++-- .../custom_card_wsly_pollen/languages/ES.yaml | 10 +++++ .../languages/ES.yaml | 9 ++++ .../translations/es.json | 43 +++++++++++++++++++ 8 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 custom_cards/custom_card_damix48_power_details/languages/es.yaml create mode 100644 custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml create mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/es.yaml create mode 100644 custom_cards/custom_card_heat_pump/languages/es.yaml create mode 100644 custom_cards/custom_card_wsly_pollen/languages/ES.yaml create mode 100644 custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml create mode 100644 custom_components/ui_lovelace_minimalist/translations/es.json diff --git a/custom_cards/custom_card_damix48_power_details/languages/es.yaml b/custom_cards/custom_card_damix48_power_details/languages/es.yaml new file mode 100644 index 000000000..9d0d1c749 --- /dev/null +++ b/custom_cards/custom_card_damix48_power_details/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml new file mode 100644 index 000000000..08f72bf65 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml new file mode 100644 index 000000000..38f06f5a2 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_heat_pump/languages/es.yaml b/custom_cards/custom_card_heat_pump/languages/es.yaml new file mode 100644 index 000000000..a027e0df1 --- /dev/null +++ b/custom_cards/custom_card_heat_pump/languages/es.yaml @@ -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" diff --git a/custom_cards/custom_card_paddy_welcome/languages/es.yaml b/custom_cards/custom_card_paddy_welcome/languages/es.yaml index 8bd843098..499e86cbe 100644 --- a/custom_cards/custom_card_paddy_welcome/languages/es.yaml +++ b/custom_cards/custom_card_paddy_welcome/languages/es.yaml @@ -1,7 +1,7 @@ --- ulm_custom_card_paddy_welcome_language_variables: variables: - ulm_custom_card_paddy_welcome_morning: "Buenos días" - ulm_custom_card_paddy_welcome_afternoon: "Buenas tardes" - ulm_custom_card_paddy_welcome_evening: "Buenas noches" - ulm_custom_card_paddy_welcome_hello: "Hola" + ulm_custom_card_paddy_welcome_morning: "¡Buenos días" + ulm_custom_card_paddy_welcome_afternoon: "¡Buenas tardes" + ulm_custom_card_paddy_welcome_evening: "¡Buenas noches" + ulm_custom_card_paddy_welcome_hello: "¡Hola" diff --git a/custom_cards/custom_card_wsly_pollen/languages/ES.yaml b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml new file mode 100644 index 000000000..d991665cb --- /dev/null +++ b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml @@ -0,0 +1,10 @@ +# ES.yaml for custom_card_wsly_pollen +--- +custom_card_wsly_pollen_language_variables: + variables: + custom_card_wsly_pollen_none: "Ninguno" + custom_card_wsly_pollen_very_low: "Muy bajo" + custom_card_wsly_pollen_low: "Bajo" + custom_card_wsly_pollen_medium: "Medio" + custom_card_wsly_pollen_high: "Alto" + custom_card_wsly_pollen_very_high: "Muy alto" diff --git a/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml new file mode 100644 index 000000000..2a67c870b --- /dev/null +++ b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml @@ -0,0 +1,9 @@ +--- +ulm_custom_card_yagrasdemonde_lights_count_language_variables: + variables: + ulm_custom_card_yagrasdemonde_lights_count_light_0: "Ninguna luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_1: "1 luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_many: "luces encendidas" + ulm_custom_card_yagrasdemonde_lights_count_cover_0: "Ninguna cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_1: "1 cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_many: "cortinas abiertas" diff --git a/custom_components/ui_lovelace_minimalist/translations/es.json b/custom_components/ui_lovelace_minimalist/translations/es.json new file mode 100644 index 000000000..cc3a1677b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/translations/es.json @@ -0,0 +1,43 @@ +{ + "title": "UI Lovelace Minimalist", + "config": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + }, + "options": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + } +} From 5af418e94637bad70811891a8dcd9ba4509f2591 Mon Sep 17 00:00:00 2001 From: 13robin37 Date: Sat, 14 May 2022 09:17:42 +0200 Subject: [PATCH 35/46] Create de.yaml --- .../custom_card_eraycetinay_lock/languages/de.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/de.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml new file mode 100644 index 000000000..8ed2b7f11 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml @@ -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" From 8829a3ba03f05e7f14de50699b3fe89bf6901229 Mon Sep 17 00:00:00 2001 From: basbruss Date: Wed, 18 May 2022 17:36:25 +0000 Subject: [PATCH 36/46] Update docs --- .../custom_card_homeassistant_updates.md | 2 +- docs/usage/custom_cards/custom_card_nas.md | 66 +++++++++++++++---- 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/docs/usage/custom_cards/custom_card_homeassistant_updates.md b/docs/usage/custom_cards/custom_card_homeassistant_updates.md index 7d48be8a6..6240f62d5 100644 --- a/docs/usage/custom_cards/custom_card_homeassistant_updates.md +++ b/docs/usage/custom_cards/custom_card_homeassistant_updates.md @@ -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: diff --git a/docs/usage/custom_cards/custom_card_nas.md b/docs/usage/custom_cards/custom_card_nas.md index 25bc874aa..7ae6a88c3 100644 --- a/docs/usage/custom_cards/custom_card_nas.md +++ b/docs/usage/custom_cards/custom_card_nas.md @@ -9,6 +9,8 @@ hide: The `card-nas` shows you a specific sensor value from your NAS, eg. the disk space used. +![Screenshot](../../assets/img/custom_card_nas.png) + ## Credits Author: tben - 2021 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -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" ``` From d8aace5de24aefd3b1e84a16a8051760ac18e4f7 Mon Sep 17 00:00:00 2001 From: pw521312 Date: Fri, 6 May 2022 22:05:54 +0100 Subject: [PATCH 37/46] Intial commit of custom_card_more_power_outlet --- .../custom_card_more_power_outlet.yaml | 45 ++++++++++ .../custom_card_more_power_outlet/readme.md | 86 +++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml create mode 100644 custom_cards/custom_card_more_power_outlet/readme.md diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml new file mode 100644 index 000000000..3d42d79f1 --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -0,0 +1,45 @@ +--- +### 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) { + 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 + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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; + } + ]]] diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md new file mode 100644 index 000000000..07cfe908c --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -0,0 +1,86 @@ +--- +title: More Power Outlet Card +hide: + - toc +--- + + +## Description + +![example-image](../../assets/img/ulm_cards/card_power_outlet.png){ width="500" } + +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. + +## 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) { + 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 + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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) { + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; + + } 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; + } + ]]] + +``` From 157d5862cb31f01aedbcf5e9924922dec3957cf3 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 22:14:02 +0100 Subject: [PATCH 38/46] Update readme.md --- custom_cards/custom_card_more_power_outlet/readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index 07cfe908c..ae6f5ece3 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -1,13 +1,11 @@ --- title: More Power Outlet Card -hide: - - toc --- ## Description -![example-image](../../assets/img/ulm_cards/card_power_outlet.png){ width="500" } +image 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. From f171fe34e6cc66e659d97968322ccb6354292a54 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 22:21:32 +0100 Subject: [PATCH 39/46] Update readme.md Addition of Credit. --- custom_cards/custom_card_more_power_outlet/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index ae6f5ece3..d44051850 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -9,6 +9,9 @@ title: More Power Outlet Card 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 | From 1a7cbc3e00cbde5ef5c48f2e08ef81453a545190 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 23:03:29 +0100 Subject: [PATCH 40/46] Updates to include Hours / Mins Conversion --- .../custom_card_more_power_outlet.yaml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index 3d42d79f1..ff6771d6d 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -13,17 +13,22 @@ custom_card_more_power_outlet: 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) { - 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 + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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"; @@ -31,8 +36,10 @@ custom_card_more_power_outlet: 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) { - return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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") { From d046511d134ef32385abd5b203b965f65a22a1d2 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Fri, 6 May 2022 23:04:42 +0100 Subject: [PATCH 41/46] Updated template code to include Hours / Minutes --- .../custom_card_more_power_outlet/readme.md | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index d44051850..d76a82868 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -53,17 +53,22 @@ custom_card_more_power_outlet: 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) { - 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 + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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) { - return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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"; @@ -71,8 +76,10 @@ custom_card_more_power_outlet: 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) { - return states[variables.custom_card_more_power_outlet_time_sensor].state + "Mins"; - + 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") { @@ -83,5 +90,4 @@ custom_card_more_power_outlet: return entity.state; } ]]] - ``` From f294c4327218c91a84ceded3678e88fd83ca3463 Mon Sep 17 00:00:00 2001 From: wranglatang <30660751+wranglatang@users.noreply.github.com> Date: Thu, 12 May 2022 14:55:58 +0100 Subject: [PATCH 42/46] Update custom_card_more_power_outlet.yaml Removed White Space and also added function where the if the sensor has a defined energy sensor which has a value of above 0 - Even if the device is off, this value will show on the card. --- .../custom_card_more_power_outlet.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index ff6771d6d..bed4fa914 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -31,10 +31,8 @@ custom_card_more_power_outlet: 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"; @@ -42,6 +40,12 @@ custom_card_more_power_outlet: 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") { From 0744e40045a976ac5c85920366ebbb28642e3f92 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Wed, 18 May 2022 23:20:43 +0200 Subject: [PATCH 43/46] Fix pre-commit --- .../custom_card_more_power_outlet.yaml | 3 ++- custom_cards/custom_card_more_power_outlet/readme.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml index bed4fa914..1bc5651e8 100644 --- a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -14,7 +14,8 @@ custom_card_more_power_outlet: [[[ 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"; + 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) { diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md index d76a82868..819124663 100644 --- a/custom_cards/custom_card_more_power_outlet/readme.md +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -10,6 +10,7 @@ title: More Power Outlet Card 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 @@ -19,8 +20,8 @@ Author: Wranglatang - 2022 Vesion 1.0.0 | 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]. | +|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 From b5e56666d1a3f9414aaedd7a25396c89c4d2a3c8 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 19:07:02 +0200 Subject: [PATCH 44/46] Rework mainly media_player popup --- .../popup_buttons/popup_button.yaml | 2 + .../popup_buttons/popup_button_app.yaml | 118 +++++++++++++++++ .../popup_buttons/popup_button_source.yaml | 15 +++ .../popup_buttons/popup_button_volume.yaml | 14 +- .../popup_buttons/popup_card_volume.yaml | 15 +++ .../popup_buttons/popup_chip_controls.yaml | 76 +++++++++++ .../popup_buttons/popup_chip_volume.yaml | 23 ++++ .../popup_buttons/popup_header.yaml | 2 + .../popup_layouts/popup_list_items.yaml | 5 + .../popups/popup_light_brightness.yaml | 1 - .../popups/popup_media_player_infos.yaml | 120 ++++++++++++------ 11 files changed, 352 insertions(+), 39 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml index 0ba7ce89c..e0638b80d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml @@ -11,6 +11,8 @@ popup_button: card: - background: "none" - box-shadow: "none" + - border-radius: "none" + - padding: "12px" icon: - color: "var(--primary-color)" img_cell: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml new file mode 100644 index 000000000..fa055c76b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -0,0 +1,118 @@ +--- +popup_button_app: + template: + - "popup_button" + show_name: true + show_label: true + styles: + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + 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" + - margin-top: "0px" + icon: + - color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "#1DB954"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "#1DB954"; + } + return color; + ]]] + img_cell: + - border: "1px solid var(--color-theme)" + - border-shadow: "none" + - background-color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "var(--primary-color)"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "var(--primary-color)"; + } + return color; + ]]] + icon: > + [[[ + var icon = entity.attributes.icon || "mdi:speaker"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var icon = "mdi:spotify"; + } else if(app == "google podcasts"){ + var icon = "mdi:google-podcast"; + } else if(app == "plex"){ + var icon = "mdi:plex"; + } else if(app == "soundcloud"){ + var icon = "mdi:soundcloud"; + } else if(app == "youtube music"){ + var icon = "mdi:youtube"; + } else if (app == "oto music"){ + var icon = "mdi:music-circle"; + } else if(app == "pandora"){ + var icon = "mdi:pandora"; + } else if(app == "netflix"){ + var icon = "mdi:netflix"; + } else if(app == "bluetooth audio"){ + var icon = "mdi:bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var icon = "mdi:spotify"; + } + return icon; + ]]] + label: > + [[[ + var label = entity.attributes.media_title || entity.attributes.friendly_name; + return label; + ]]] + name: > + [[[ + var name = entity.attributes.friendly_name; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var name = "Spotify"; + } else if(app == "google podcasts"){ + var name = "Google-Podcast"; + } else if(app == "plex"){ + var name = "Plex"; + } else if(app == "soundcloud"){ + var name = "Soundcloud"; + } else if(app == "youtube music"){ + var name = "Youtube"; + } else if (app == "oto music"){ + var name = "Oto Music"; + } else if(app == "pandora"){ + var name = "Pandora"; + } else if(app == "netflix"){ + var name = "Netflix"; + } else if(app == "bluetooth audio"){ + var name = "Bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var name = "Spotify"; + } + return name; + ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml new file mode 100644 index 000000000..a43106542 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml @@ -0,0 +1,15 @@ +--- +popup_button_source: + template: + - "popup_button" + - "ulm_language_variables" + icon: "mdi:playlist-music" + name: "Source" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml index bdc7d8620..27054bd4a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml @@ -1,5 +1,17 @@ --- popup_button_volume: - template: "ulm_language_variables" + template: + - "popup_button" + - "ulm_language_variables" icon: "mdi:volume-high" name: "Volume" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + tap_action: + action: "more_info" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml new file mode 100644 index 000000000..1f548c7b9 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml @@ -0,0 +1,15 @@ +--- +popup_card_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: "80%" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml new file mode 100644 index 000000000..99d97e7a7 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml @@ -0,0 +1,76 @@ +--- +popup_chip_controls: + template: "chips" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "item1 item2 item3" + - justify-content: "space-evenly" + - display: "flex" + - grid-template-columns: "min-content min-content min-content" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-previous" + tap_action: + action: "call-service" + service: "media_player.media_previous_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.25)" + item2: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:play" + state: + - value: "playing" + icon: "mdi:pause" + tap_action: + action: "call-service" + service: "media_player.media_play_pause" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + item3: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-next" + tap_action: + action: "call-service" + service: "media_player.media_next_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.25)" + +icon_controls: + show_icon: true + show_label: false + show_name: false + show_state: false + styles: + card: + - background: "none" + - box-shadow: "none" + - height: "42px" + grid: + - grid-template-areas: "'i'" + img_cell: + - width: "30px" + size: "80%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml new file mode 100644 index 000000000..c0280a244 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml @@ -0,0 +1,23 @@ +--- +popup_chip_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: > + [[[ + let level = entity.attributes.volume_level + return level * 100 + '%' + ]]] + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" + img_cell: + - width: "30px" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml index 03484ba24..04db54a4f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml @@ -15,6 +15,8 @@ popup_header: - font-weight: "bold" - font-size: "12px" - filter: "opacity(40%)" + name: + - margin-top: "6px" icon: - color: "var(--color-theme)" label: |- diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml index 840f48f63..42c111946 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml @@ -4,3 +4,8 @@ popup_list_items: styles: card: - background: "none" + - border-radius: "none" + grid: + - grid-template-areas: "'item1 item2 item3'" + - justify-content: "space-evenly" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml index 0a1abfd11..ff8414935 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml @@ -37,7 +37,6 @@ popup_light_brightness: } return columns.join(" "); ]]] - - column-gap: "30px" card: - background: "var(--primary-background-color)" - box-shadow: "none" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index 607ec7438..d4650395a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -1,15 +1,17 @@ --- popup_media_player_infos: + triggers_update: "all" styles: grid: - - grid-template-areas: "'header header' 'content1 content2' 'footer footer'" - - grid-template-rows: "16vh 56vh 14vh" - - grid-template-columns: "1fr 1fr" - - column-gap: "30px" + - grid-template-areas: "'header' 'content1' 'footer'" + - grid-template-rows: "14vh 56vh 16vh" + - row-gap: "2.5%" card: - background: "var(--primary-background-color)" - box-shadow: "none" - padding: "4%" + - border-radius: "none" + - height: "100vh" custom_fields: header: - align-self: "start" @@ -22,17 +24,18 @@ popup_media_player_infos: - max-width: "400px" - justify-self: "center" content2: - - align-self: "center" + - display: "none" buttons: - display: "none" footer: - align-self: "end" - margin-top: "25px" + - padding-bottom: "4%" extra_styles: | @media (max-width: 800px) { #container { - grid-template-areas: "header" "content1" "buttons" "footer" !important; - grid-template-rows: 16vh 52vh 14vh 14vh !important; + grid-template-areas: "header" "content1" "footer" !important; + grid-template-rows: 14vh 56vh 16vh !important; grid-template-columns: 1fr !important; } #buttons { @@ -52,14 +55,26 @@ popup_media_player_infos: content1: card: type: "custom:button-card" + show_icon: false + show_name: false + show_label: false styles: grid: - - grid-template-areas: "'picture' 'media' 'control'" + - grid-template-areas: "'app' 'picture' 'media' 'control' 'bar'" card: - - background: "none" + - background-blend-mode: "soft-light" + - background: | + [[[ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' + : '' + ]]] - box-shadow: "none" - - padding: "4%" + - padding: "1%" custom_fields: + app: + - justify-self: "start" + - align-self: "start" picture: - margin-left: "auto" - margin-right: "auto" @@ -73,7 +88,17 @@ popup_media_player_infos: control: - background: "none" - box-shadow: "none" + bar: + - align-self: "start" + - background: "none" + - box-shadow: "none" + - margin-bottom: "12px" custom_fields: + app: + card: + type: "custom:button-card" + template: "popup_button_app" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" picture: card: type: "custom:mini-media-player" @@ -132,6 +157,7 @@ popup_media_player_infos: type: "custom:mini-media-player" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" hide: + controls: true icon: true name: true info: true @@ -145,43 +171,58 @@ popup_media_player_infos: background: none !important; box-shadow: none !important; width: 50% !important; - margin-left: auto !important; - margin-right: auto !important; + margin-left: 6px !important; + margin-right: 6px !important; } .mmp__bg{ background: none !important; } - buttons: - card: - type: "custom:button-card" - template: "list_2_items" - styles: - card: - - background: "none" - custom_fields: - item1: - card: - type: "custom:button-card" - template: - - "popup_button" - - "popup_button_selected" - - "popup_button_playing" - item2: + bar: card: type: "custom:button-card" - template: - - "popup_button" - - "popup_button_volume" - tap_action: - action: "fire-dom-event" - browser_mod: - command: "popup" - hide_header: true + template: "list_2_items" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + grid: + - display: "flex" + - justify-content: "center" + custom_fields: + item1: card: type: "custom:button-card" - template: "popup_media_player_volume" + template: "popup_chip_controls" variables: ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + item2: + card: + type: "custom:button-card" + template: "popup_chip_volume" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0" + tap_action: + action: "fire-dom-event" + browser_mod: + command: "popup" + hide_header: true + card: + type: "custom:button-card" + template: "popup_media_player_volume" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" footer: card: type: "custom:button-card" @@ -196,6 +237,11 @@ popup_media_player_infos: type: "custom:button-card" template: "popup_button_power" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + item3: + card: + type: "custom:button-card" + template: "popup_button_source" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" content2: card: type: "custom:my-slider" From 6096807cddeadab158c8ada11f1e57c76479bb51 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 19:33:20 +0200 Subject: [PATCH 45/46] adapt dark mode --- .../popup_templates/popup_buttons/popup_button_app.yaml | 3 ++- .../popup_templates/popup_buttons/popup_chip_controls.yaml | 6 +++--- .../popup_templates/popups/popup_media_player_infos.yaml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml index fa055c76b..e5160c6bf 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -16,6 +16,7 @@ popup_button_app: - font-size: "12px" - filter: "opacity(40%)" - margin-left: "12px" + - color: "#212121" name: - align-self: "end" - justify-self: "start" @@ -26,7 +27,7 @@ popup_button_app: icon: - color: > [[[ - var color = "var(--color-theme)"; + var color = "51,51,51"; if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml index 99d97e7a7..a0a33b42d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml @@ -7,7 +7,7 @@ popup_chip_controls: card: - background: "none" - box-shadow: "none" - - border: "1px solid rgba(var(--color-theme),0.25)" + - border: "1px solid rgba(var(--color-theme),0.5)" - height: "42px" - border-radius: "21px" grid: @@ -29,7 +29,7 @@ popup_chip_controls: entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" styles: icon: - - color: "rgba(var(--color-theme),0.25)" + - color: "rgba(var(--color-theme),0.5)" item2: card: type: "custom:button-card" @@ -57,7 +57,7 @@ popup_chip_controls: entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" styles: icon: - - color: "rgba(var(--color-theme),0.25)" + - color: "rgba(var(--color-theme),0.5)" icon_controls: show_icon: true diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index d4650395a..c71cd27e4 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -147,7 +147,7 @@ popup_media_player_infos: .entity__info__media { font-weight: bold !important; font-size: 14px !important; - color: var(--primary-text-color) !important; + color: "#212121" !important; } :host { --paper-progress-active-color: blue !important; From 80b5287a4ff5eb0cdaab24439979402560445af8 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 19 May 2022 23:34:28 +0200 Subject: [PATCH 46/46] Full dark mode support --- .../popup_buttons/popup_button_app.yaml | 7 +++---- .../popups/popup_media_player_infos.yaml | 14 ++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml index e5160c6bf..6933d9fd6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -16,7 +16,6 @@ popup_button_app: - font-size: "12px" - filter: "opacity(40%)" - margin-left: "12px" - - color: "#212121" name: - align-self: "end" - justify-self: "start" @@ -27,7 +26,7 @@ popup_button_app: icon: - color: > [[[ - var color = "51,51,51"; + var color = "var(--color-theme)"; if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ @@ -47,10 +46,10 @@ popup_button_app: if(entity.attributes.app_name){ var app = entity.attributes.app_name.toLowerCase(); if(app = "spotify"){ - color = "var(--primary-color)"; + color = "#434343"; } } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ - var color = "var(--primary-color)"; + var color = "#434343"; } return color; ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index c71cd27e4..76b3e4e1a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -65,9 +65,15 @@ popup_media_player_infos: - background-blend-mode: "soft-light" - background: | [[[ - return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null - ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' - : '' + if(hass.themes.darkMode){ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, #333333 90%, grey 105% ,#333333 110%)' + : '' + }else{ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' + : '' + } ]]] - box-shadow: "none" - padding: "1%" @@ -147,7 +153,7 @@ popup_media_player_infos: .entity__info__media { font-weight: bold !important; font-size: 14px !important; - color: "#212121" !important; + color: var(--primary-text-color) !important; } :host { --paper-progress-active-color: blue !important;