From 6edfbfe7f230e1fb7473d3963d37a02387756171 Mon Sep 17 00:00:00 2001 From: Aneesh Bhatnagar Date: Tue, 28 Nov 2023 23:14:54 -0500 Subject: [PATCH 01/37] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Update=20docs=20fo?= =?UTF-8?q?r=20Binary=20Sensor=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/usage/cards/card_binary_sensor.md | 10 +++++++++- docs/usage/cards/card_binary_sensor_alert.md | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/usage/cards/card_binary_sensor.md b/docs/usage/cards/card_binary_sensor.md index 8dac0aa4c..4079ee9be 100644 --- a/docs/usage/cards/card_binary_sensor.md +++ b/docs/usage/cards/card_binary_sensor.md @@ -30,6 +30,14 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi ulm_show_last_changed: true ``` +!!! Warning "⚠️ Breaking Change `v1.3.8`" + + `ulm_show_last_changed` is renamed to `ulm_card_binary_sensor_show_last_changed`: + ```yaml + variables: + ulm_card_binary_sensor_show_last_changed: true + ``` + ## Usage ```yaml @@ -37,7 +45,7 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi template: card_binary_sensor variables: ulm_card_binary_sensor_alert: true - ulm_show_last_changed: true + ulm_card_binary_sensor_show_last_changed: true entity: binary_sensor.garage_door ``` diff --git a/docs/usage/cards/card_binary_sensor_alert.md b/docs/usage/cards/card_binary_sensor_alert.md index 6879344ff..302c5b39c 100644 --- a/docs/usage/cards/card_binary_sensor_alert.md +++ b/docs/usage/cards/card_binary_sensor_alert.md @@ -30,6 +30,13 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi variables: ulm_show_last_changed: true ``` +!!! Warning "⚠️ Breaking Change `v1.3.8`" + + `ulm_show_last_changed` is renamed to `ulm_card_binary_sensor_show_last_changed`: + ```yaml + variables: + ulm_card_binary_sensor_show_last_changed: true + ``` ## Usage @@ -38,7 +45,7 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi template: card_binary_sensor_alert variables: ulm_card_binary_sensor_alert: true - ulm_show_last_changed: true + ulm_card_binary_sensor_show_last_changed: true entity: binary_sensor.garage_door ``` From e95458ffbc19f14ec5e965c0d06ae6692926d5f8 Mon Sep 17 00:00:00 2001 From: Krisztian Milesz Date: Sun, 24 Dec 2023 23:16:24 +0100 Subject: [PATCH 02/37] Added Hungarian translation --- .../languages/hu.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml diff --git a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml new file mode 100644 index 000000000..848b525aa --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml @@ -0,0 +1,11 @@ +--- +ulm_custom_card_eraycetinay_elapsed_time_language_variables: + variables: + custom_card_eraycetinay_elapsed_time_day: "nappal" + custom_card_eraycetinay_elapsed_time_days: "nappal" + custom_card_eraycetinay_elapsed_time_hour: "órával" + custom_card_eraycetinay_elapsed_time_hours: "órával" + custom_card_eraycetinay_elapsed_time_minute: "perccel" + custom_card_eraycetinay_elapsed_time_minutes: "perccel" + custom_card_eraycetinay_elapsed_time_ago: "ezelőtt" + custom_card_eraycetinay_elapsed_time_justnow: "éppen most" From fa5e26246de8090101515faaac49f1d47651e09d Mon Sep 17 00:00:00 2001 From: tieskuh <115901851+tieskuh@users.noreply.github.com> Date: Sat, 30 Dec 2023 14:20:50 +0100 Subject: [PATCH 03/37] Update custom_card_mpse_printer.yaml Fix for card-mod v3.4.0 --- .../custom_card_mpse_printer.yaml | 244 +++++++++--------- 1 file changed, 124 insertions(+), 120 deletions(-) diff --git a/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml b/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml index 3cf1542f1..56fad13d0 100644 --- a/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml +++ b/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml @@ -41,36 +41,37 @@ custom_card_mpse_printer: color: "black" entities: - entity: "[[[ return variables.ulm_card_printer_black_name ]]]" - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } + card_mod: + style: | + bar-card-currentbar{ + border: 0.01rem solid rgba(var(--color-theme),.4); + } + bar-card-backgroundbar{ + display: none; + } + bar-card-name{ + width: 2rem; + margin-right: 40px !important; + } + bar-card-value{ + width: 2rem; + margin-left: 40px !important; + justify-content: center; + display: flex; + color: grey; + } + bar-card-background{ + margin: 4px 0 4px 0 !important; + text-align: initial; + } + ha-card{ + --bar-card-border-radius: 5px; + border-radius: 0px; + box-shadow: none; + } + #states{ + padding: 0 16px; + } item3: card: type: "custom:bar-card" @@ -84,36 +85,37 @@ custom_card_mpse_printer: color: "rgb(250,255,0)" entities: - entity: "[[[ return variables.ulm_card_printer_yellow_name ]]]" - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } + card_mod: + style: | + bar-card-currentbar{ + border: 0.01rem solid rgba(var(--color-theme),.4); + } + bar-card-backgroundbar{ + display: none; + } + bar-card-name{ + width: 2rem; + margin-right: 40px !important; + } + bar-card-value{ + width: 2rem; + margin-left: 40px !important; + justify-content: center; + display: flex; + color: grey; + } + bar-card-background{ + margin: 4px 0 4px 0 !important; + text-align: initial; + } + ha-card{ + --bar-card-border-radius: 5px; + border-radius: 0px; + box-shadow: none; + } + #states{ + padding: 0 16px; + } item4: card: type: "custom:bar-card" @@ -127,36 +129,37 @@ custom_card_mpse_printer: color: "rgb(248,0,255)" entities: - entity: "[[[ return variables.ulm_card_printer_magenta_name ]]]" - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } + card_mod: + style: | + bar-card-currentbar{ + border: 0.01rem solid rgba(var(--color-theme),.4); + } + bar-card-backgroundbar{ + display: none; + } + bar-card-name{ + width: 2rem; + margin-right: 40px !important; + } + bar-card-value{ + width: 2rem; + margin-left: 40px !important; + justify-content: center; + display: flex; + color: grey; + } + bar-card-background{ + margin: 4px 0 4px 0 !important; + text-align: initial; + } + ha-card{ + --bar-card-border-radius: 5px; + border-radius: 0px; + box-shadow: none; + } + #states{ + padding: 0 16px; + } item5: card: type: "custom:bar-card" @@ -170,36 +173,37 @@ custom_card_mpse_printer: color: "rgb(0,255,255)" entities: - entity: "[[[ return variables.ulm_card_printer_cyan_name ]]]" - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px 16px 16px; - } + card_mod: + style: | + bar-card-currentbar{ + border: 0.01rem solid rgba(var(--color-theme),.4); + } + bar-card-backgroundbar{ + display: none; + } + bar-card-name{ + width: 2rem; + margin-right: 40px !important; + } + bar-card-value{ + width: 2rem; + margin-left: 40px !important; + justify-content: center; + display: flex; + color: grey; + } + bar-card-background{ + margin: 4px 0 4px 0 !important; + text-align: initial; + } + ha-card{ + --bar-card-border-radius: 5px; + border-radius: 0px; + box-shadow: none; + } + #states{ + padding: 0 16px 16px 16px; + } custom_card_mpse_printer_blue: state: - styles: From 962920fe7574b85cf23b399acdffece2ab5e04c3 Mon Sep 17 00:00:00 2001 From: tieskuh <115901851+tieskuh@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:39:01 +0100 Subject: [PATCH 04/37] Update custom_card_bar_card.yaml Fix for card_mod v3.4.0+ --- .../custom_card_bar_card.yaml | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml b/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml index dcb4ca712..58dd0b13d 100644 --- a/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml +++ b/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml @@ -44,26 +44,27 @@ custom_card_bar_card: name: "off" min: "[[[ return variables.ulm_custom_card_bar_card_min ]]]" max: "[[[ return variables.ulm_custom_card_bar_card_max ]]]" - style: |- - bar-card-currentbar { - border-radius: 0px !important; - right: 0; - } - bar-card-backgroundbar { - border-radius: 0px !important; - right: 0; - } - #states { - padding: 0; - height: 35px; - } - bar-card-background { - height: 35px !important; - } - bar-card-indicator { - left: 10px; - } - bar-card-value { - font-weight: bold; - font-size: 12px; - } + card_mod: + style: |- + bar-card-currentbar { + border-radius: 0px !important; + right: 0; + } + bar-card-backgroundbar { + border-radius: 0px !important; + right: 0; + } + #states { + padding: 0; + height: 35px; + } + bar-card-background { + height: 35px !important; + } + bar-card-indicator { + left: 10px; + } + bar-card-value { + font-weight: bold; + font-size: 12px; + } From 0241e5025ac4b1ee3742ab82cb446b6707079b27 Mon Sep 17 00:00:00 2001 From: tieskuh <115901851+tieskuh@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:41:16 +0100 Subject: [PATCH 05/37] Update custom_card_sisimomo_printer.yaml Fix for card-mod 3.4.0+ --- .../custom_card_sisimomo_printer.yaml | 115 +++++++++--------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml b/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml index 30315c9f4..efe166995 100644 --- a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml +++ b/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml @@ -163,60 +163,61 @@ custom_card_sisimomo_printer: } ]]] - style: | - /* Cartridge CSS */ - div#cartridges .wrapper { - display: grid; - grid-template-columns: auto 1fr auto; - grid-gap: 1rem; - padding: 12px 8px 8px 8px; - } - div#cartridges .wrapper > *:nth-child(3n-2), .wrapper > *:nth-child(3n) { - place-self: center start; - } - div#cartridges .wrapper > .label { - filter: opacity(70%); - font-size: medium; - } - div#cartridges .wrapper > .container-bar { - position: relative; - border-radius: 4px; - border: 0.01rem solid rgba(var(--color-theme),.35); - } - div#cartridges .wrapper > .container-bar .bar { - height: 20px; - border-radius: 4px; - } - div#cartridges .wrapper > .state { - filter: opacity(40%); - font-size: medium; - } - - /* Error CSS */ - div#cartridges .error-container { - text-align: left; - font-size: 75%; - font-family: var(--code-font-family, monospace); - padding: 10px; - background-color: rgba(219, 68, 55, 0.75); - margin-top:10px; - border-radius:8px; - } - div#cartridges .error-container ul { - list-style: none; - padding: 0; - margin: 0; - overflow-wrap: break-word; - word-wrap: break-word; - white-space: normal !important; - } - div#cartridges .error-container ul li { - margin-top: 0.5em; - } - div#cartridges .info-unavailable { - padding: 1em; - white-space: normal; - margin-top:10px; - border-radius:8px; - opacity: 60%; - } + card_mod: + style: | + /* Cartridge CSS */ + div#cartridges .wrapper { + display: grid; + grid-template-columns: auto 1fr auto; + grid-gap: 1rem; + padding: 12px 8px 8px 8px; + } + div#cartridges .wrapper > *:nth-child(3n-2), .wrapper > *:nth-child(3n) { + place-self: center start; + } + div#cartridges .wrapper > .label { + filter: opacity(70%); + font-size: medium; + } + div#cartridges .wrapper > .container-bar { + position: relative; + border-radius: 4px; + border: 0.01rem solid rgba(var(--color-theme),.35); + } + div#cartridges .wrapper > .container-bar .bar { + height: 20px; + border-radius: 4px; + } + div#cartridges .wrapper > .state { + filter: opacity(40%); + font-size: medium; + } + + /* Error CSS */ + div#cartridges .error-container { + text-align: left; + font-size: 75%; + font-family: var(--code-font-family, monospace); + padding: 10px; + background-color: rgba(219, 68, 55, 0.75); + margin-top:10px; + border-radius:8px; + } + div#cartridges .error-container ul { + list-style: none; + padding: 0; + margin: 0; + overflow-wrap: break-word; + word-wrap: break-word; + white-space: normal !important; + } + div#cartridges .error-container ul li { + margin-top: 0.5em; + } + div#cartridges .info-unavailable { + padding: 1em; + white-space: normal; + margin-top:10px; + border-radius:8px; + opacity: 60%; + } From 53d3f9fd039c143b45b0816dabcc25792ca0a9ad Mon Sep 17 00:00:00 2001 From: Tobi Date: Fri, 5 Jan 2024 23:16:19 +0100 Subject: [PATCH 06/37] typo in card_navigate.yaml variables.ulm_card_navigate_colour instead of variables.ulm_card_navigate_color --- .../ulm_templates/card_templates/cards/card_navigate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_navigate.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_navigate.yaml index a553b9861..d385e6b36 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_navigate.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_navigate.yaml @@ -15,7 +15,7 @@ card_navigate: icon: - color: > [[[ - let color = variables.ulm_card_navigate_colour; + let color = variables.ulm_card_navigate_color; return "rgba(" + color + ",0.7)" ]]] label: From 7091c576e10e531ee6e80150865b810d7ccbd677 Mon Sep 17 00:00:00 2001 From: Patrick Masters Date: Mon, 15 Jan 2024 22:46:25 -0500 Subject: [PATCH 07/37] fix tap_action in speedtest custom card remove custom tap_action so more info works naturally. small formatting was applied for consistency in the 2 sensors --- .../custom_card_irmajavi_speedtest.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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 d4a204be1..bc6df3597 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 @@ -30,11 +30,9 @@ custom_card_irmajavi_speedtest: show_name: true show_icon: true label: >- - [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_model - ]]] + [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_model ]]] name: >- - [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_name - ]]] + [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_name ]]] icon: "mdi:wifi" styles: icon: @@ -146,15 +144,13 @@ custom_card_irmajavi_speedtest: item1: card: type: "custom:button-card" - tap_action: - action: "more-info" color: "var(--google-blue)" show_label: true show_icon: false name: "[[[ return variables.ulm_custom_card_irmajavi_speedtest_download ]]]" entity: >- [[[ return - variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity; + variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity; ]]] label: | [[[ @@ -209,10 +205,10 @@ custom_card_irmajavi_speedtest: [[[ var state1 = ""; if (states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].state){ - var state1 = states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].state; - if (states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement){ - state1 += states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement; - } + var state1 = states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].state; + if (states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement){ + state1 += states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement; + } } return state1; ]]] From e79f945d408e1fd8b0240ac0338a7bd8dc7e73a5 Mon Sep 17 00:00:00 2001 From: Maxim Gavrilenko Date: Mon, 22 Jan 2024 16:49:27 +0300 Subject: [PATCH 08/37] Update card_vertical_button.md typo: booelan -> boolean --- docs/usage/cards/card_vertical_button.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/cards/card_vertical_button.md b/docs/usage/cards/card_vertical_button.md index 6b59e7084..15cd62720 100644 --- a/docs/usage/cards/card_vertical_button.md +++ b/docs/usage/cards/card_vertical_button.md @@ -9,7 +9,7 @@ hide: ![example-image](../../assets/img/ulm_cards/card_example.png){ width="500" } -Card `card_vertical_button` can be used in different ways. The primary usage is to switch between scenes or toggle a scene on/off. The secondary use is to toggle a switch or light. It's intended to be used with helper entities, either [input_select](https://www.home-assistant.io/integrations/input_select/) or [input_booelan](https://www.home-assistant.io/integrations/input_boolean/). +Card `card_vertical_button` can be used in different ways. The primary usage is to switch between scenes or toggle a scene on/off. The secondary use is to toggle a switch or light. It's intended to be used with helper entities, either [input_select](https://www.home-assistant.io/integrations/input_select/) or [input_boolean](https://www.home-assistant.io/integrations/input_boolean/). You connect the card to either an input_select (toggle between scenes) or input_boolean (toggle one scene) and the button will change the state of these entities. The final step is to create an automation that triggers on the state change and then runs the actions you want, apply a scene or interact with other entities. From ba70bea1c55168e12e2f58f4e80170b4d6b41403 Mon Sep 17 00:00:00 2001 From: Florian Schlag Date: Tue, 20 Feb 2024 22:15:56 +0100 Subject: [PATCH 09/37] chore: fix typo --- docs/usage/cards/card_cover.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/cards/card_cover.md b/docs/usage/cards/card_cover.md index c88877aab..b51b7f78a 100644 --- a/docs/usage/cards/card_cover.md +++ b/docs/usage/cards/card_cover.md @@ -47,7 +47,7 @@ This card has backward compatibility with older template except custom name. It variables: ulm_card_cover_enable_controls: true ulm_card_cover_enable_slider: true - ulm_card_cver_favorite_percentage: 45 + ulm_card_cover_favorite_percentage: 45 ulm_card_cover_color: "green" ``` From 2e2201d88a2a2dadc19ab2d9aa1f36c00ae20d07 Mon Sep 17 00:00:00 2001 From: idominiki <62521486+idominiki@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:20:50 +0100 Subject: [PATCH 10/37] Update custom_card_paddy_dwd_pollen.yaml Fix for custom_card_paddy_dwd_pollen as state based img_cell coloring is at the false card. --- .../custom_card_paddy_dwd_pollen.yaml | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml b/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml index 1fee063b8..1144adcec 100644 --- a/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml +++ b/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml @@ -17,27 +17,6 @@ custom_card_paddy_dwd_pollen: card: type: "custom:button-card" entity: "[[[ return entity.entity_id ]]]" - item2: - card: - type: "custom:button-card" - entity: "[[[ return entity.entity_id ]]]" - label: > - [[[ - if (entity.state == "6"){ - return variables.custom_card_paddy_dwd_pollen_6; - } else if (entity.state == "5"){ - return variables.custom_card_paddy_dwd_pollen_5; - } else if (entity.state == "4"){ - return variables.custom_card_paddy_dwd_pollen_4; - } else if (entity.state == "3"){ - return variables.custom_card_paddy_dwd_pollen_3; - } else if (entity.state == "2"){ - return variables.custom_card_paddy_dwd_pollen_2; - } else if (entity.state == "1"){ - return variables.custom_card_paddy_dwd_pollen_1; - } - return variables.custom_card_paddy_dwd_pollen_none; - ]]] state: - value: "6" styles: @@ -67,3 +46,24 @@ custom_card_paddy_dwd_pollen: styles: icon: - color: "rgba(var(--color-theme),0.2)" + item2: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + label: > + [[[ + if (entity.state == "6"){ + return variables.custom_card_paddy_dwd_pollen_6; + } else if (entity.state == "5"){ + return variables.custom_card_paddy_dwd_pollen_5; + } else if (entity.state == "4"){ + return variables.custom_card_paddy_dwd_pollen_4; + } else if (entity.state == "3"){ + return variables.custom_card_paddy_dwd_pollen_3; + } else if (entity.state == "2"){ + return variables.custom_card_paddy_dwd_pollen_2; + } else if (entity.state == "1"){ + return variables.custom_card_paddy_dwd_pollen_1; + } + return variables.custom_card_paddy_dwd_pollen_none; + ]]] From 67f00f836d0544ca86c7baf8773aad6c8743e53e Mon Sep 17 00:00:00 2001 From: Henrijs Date: Sun, 26 May 2024 15:56:07 +0300 Subject: [PATCH 11/37] Fix translation variables to match naming scheme used in template --- .../languages/de.yaml | 16 ++++++++-------- .../languages/en.yaml | 16 ++++++++-------- .../languages/es.yaml | 16 ++++++++-------- .../languages/pl.yaml | 16 ++++++++-------- .../languages/sv.yaml | 16 ++++++++-------- .../languages/tr.yaml | 16 ++++++++-------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml index 1305d95eb..ecfc032b4 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml @@ -1,11 +1,11 @@ --- custom_card_eraycetinay_lock_language_variables: variables: - custom_card_eraycetinay_lock_locked: "verriegelt" - custom_card_eraycetinay_lock_unlocked: "entriegelt" - custom_card_eraycetinay_lock_locking: "verriegeln" - custom_card_eraycetinay_lock_unlocking: "entriegeln" - custom_card_eraycetinay_lock_unavailable: "nicht verfügbar" - custom_card_eraycetinay_lock_jammed: "blockiert" - custom_card_eraycetinay_lock_locked_and_opened: "Die Tür ist verschlossen, aber noch offen." - custom_card_eraycetinay_lock_battery_is_at: "Batterie ist an" + ulm_custom_card_eraycetinay_lock_locked: "verriegelt" + ulm_custom_card_eraycetinay_lock_unlocked: "entriegelt" + ulm_custom_card_eraycetinay_lock_locking: "verriegeln" + ulm_custom_card_eraycetinay_lock_unlocking: "entriegeln" + ulm_custom_card_eraycetinay_lock_unavailable: "nicht verfügbar" + ulm_custom_card_eraycetinay_lock_jammed: "blockiert" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "Die Tür ist verschlossen, aber noch offen." + ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterie ist an" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml index f34a60515..62efd41ff 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml @@ -1,11 +1,11 @@ --- custom_card_eraycetinay_lock_language_variables: variables: - custom_card_eraycetinay_lock_locked: "locked" - custom_card_eraycetinay_lock_unlocked: "unlocked" - custom_card_eraycetinay_lock_locking: "locking" - custom_card_eraycetinay_lock_unlocking: "unlocking" - custom_card_eraycetinay_lock_unavailable: "unavailable" - custom_card_eraycetinay_lock_jammed: "jammed" - custom_card_eraycetinay_lock_locked_and_opened: "The door is locked but still open." - custom_card_eraycetinay_lock_battery_is_at: "Battery is at" + ulm_custom_card_eraycetinay_lock_locked: "locked" + ulm_custom_card_eraycetinay_lock_unlocked: "unlocked" + ulm_custom_card_eraycetinay_lock_locking: "locking" + ulm_custom_card_eraycetinay_lock_unlocking: "unlocking" + ulm_custom_card_eraycetinay_lock_unavailable: "unavailable" + ulm_custom_card_eraycetinay_lock_jammed: "jammed" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "The door is locked but still open." + ulm_custom_card_eraycetinay_lock_battery_is_at: "Battery is at" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml index 637d3c74c..40bed3d92 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml @@ -1,11 +1,11 @@ --- 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" - custom_card_eraycetinay_lock_jammed: "apretada" - custom_card_eraycetinay_lock_locked_and_opened: "La puerta está cerrada pero aún abierta." - custom_card_eraycetinay_lock_battery_is_at: "la batería está en" + ulm_custom_card_eraycetinay_lock_locked: "bloqueado" + ulm_custom_card_eraycetinay_lock_unlocked: "desbloqueado" + ulm_custom_card_eraycetinay_lock_locking: "bloqueando" + ulm_custom_card_eraycetinay_lock_unlocking: "desbloqueando" + ulm_custom_card_eraycetinay_lock_unavailable: "no disponible" + ulm_custom_card_eraycetinay_lock_jammed: "apretada" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "La puerta está cerrada pero aún abierta." + ulm_custom_card_eraycetinay_lock_battery_is_at: "la batería está en" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml index b00d13270..f9e1b7509 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml @@ -1,11 +1,11 @@ --- custom_card_eraycetinay_lock_language_variables: variables: - custom_card_eraycetinay_lock_locked: "zamknięty" - custom_card_eraycetinay_lock_unlocked: "otwarty" - custom_card_eraycetinay_lock_locking: "zamykanie" - custom_card_eraycetinay_lock_unlocking: "otwieranie" - custom_card_eraycetinay_lock_unavailable: "niedostępny" - custom_card_eraycetinay_lock_jammed: "zacięty" - custom_card_eraycetinay_lock_locked_and_opened: "Drzwi są zamknięte, ale nadal otwarte." - custom_card_eraycetinay_lock_battery_is_at: "Bateria jest na" + ulm_custom_card_eraycetinay_lock_locked: "zamknięty" + ulm_custom_card_eraycetinay_lock_unlocked: "otwarty" + ulm_custom_card_eraycetinay_lock_locking: "zamykanie" + ulm_custom_card_eraycetinay_lock_unlocking: "otwieranie" + ulm_custom_card_eraycetinay_lock_unavailable: "niedostępny" + ulm_custom_card_eraycetinay_lock_jammed: "zacięty" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "Drzwi są zamknięte, ale nadal otwarte." + ulm_custom_card_eraycetinay_lock_battery_is_at: "Bateria jest na" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml index 707eab945..7a9ca5121 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml @@ -1,11 +1,11 @@ --- custom_card_eraycetinay_lock_language_variables: variables: - custom_card_eraycetinay_lock_locked: "låst" - custom_card_eraycetinay_lock_unlocked: "olåst" - custom_card_eraycetinay_lock_locking: "låser" - custom_card_eraycetinay_lock_unlocking: "låser upp" - custom_card_eraycetinay_lock_unavailable: "otillgängligt" - custom_card_eraycetinay_lock_jammed: "fastnat" - custom_card_eraycetinay_lock_locked_and_opened: "Dörren är låst men fortfarande öppen." - custom_card_eraycetinay_lock_battery_is_at: "Batterinivån är" + ulm_custom_card_eraycetinay_lock_locked: "låst" + ulm_custom_card_eraycetinay_lock_unlocked: "olåst" + ulm_custom_card_eraycetinay_lock_locking: "låser" + ulm_custom_card_eraycetinay_lock_unlocking: "låser upp" + ulm_custom_card_eraycetinay_lock_unavailable: "otillgängligt" + ulm_custom_card_eraycetinay_lock_jammed: "fastnat" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "Dörren är låst men fortfarande öppen." + ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterinivån är" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml index e612ab5f2..5aab9bdd3 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml @@ -1,11 +1,11 @@ --- custom_card_eraycetinay_lock_language_variables: variables: - custom_card_eraycetinay_lock_locked: "kilitli" - custom_card_eraycetinay_lock_unlocked: "kilitli değil" - custom_card_eraycetinay_lock_locking: "kilitleniyor" - custom_card_eraycetinay_lock_unlocking: "kilit açılıyor" - custom_card_eraycetinay_lock_unavailable: "müsait değil" - custom_card_eraycetinay_lock_jammed: "sıkışmış" - custom_card_eraycetinay_lock_locked_and_opened: "Kapı kilitli ama hala açık" - custom_card_eraycetinay_lock_battery_is_at: "pil" + ulm_custom_card_eraycetinay_lock_locked: "kilitli" + ulm_custom_card_eraycetinay_lock_unlocked: "kilitli değil" + ulm_custom_card_eraycetinay_lock_locking: "kilitleniyor" + ulm_custom_card_eraycetinay_lock_unlocking: "kilit açılıyor" + ulm_custom_card_eraycetinay_lock_unavailable: "müsait değil" + ulm_custom_card_eraycetinay_lock_jammed: "sıkışmış" + ulm_custom_card_eraycetinay_lock_locked_and_opened: "Kapı kilitli ama hala açık" + ulm_custom_card_eraycetinay_lock_battery_is_at: "pil" From 4517bec6a0450e3226e740cbc0f74d134236b172 Mon Sep 17 00:00:00 2001 From: Henrijs Date: Sun, 26 May 2024 16:14:29 +0300 Subject: [PATCH 12/37] Add support for binary battery sensor --- .../custom_card_eraycetinay_lock/README.md | 14 ++++++++ .../custom_card_eraycetinay_lock.yaml | 32 ++++++++++++++----- .../languages/de.yaml | 1 + .../languages/en.yaml | 1 + .../languages/es.yaml | 1 + .../languages/pl.yaml | 1 + .../languages/sv.yaml | 1 + .../languages/tr.yaml | 1 + 8 files changed, 44 insertions(+), 8 deletions(-) diff --git a/custom_cards/custom_card_eraycetinay_lock/README.md b/custom_cards/custom_card_eraycetinay_lock/README.md index 777c75ac2..9b3bb9e06 100644 --- a/custom_cards/custom_card_eraycetinay_lock/README.md +++ b/custom_cards/custom_card_eraycetinay_lock/README.md @@ -107,6 +107,20 @@ Version: 0.0.3 no Displays a warning when the door is lock but the door is still open. + + ulm_custom_card_eraycetinay_lock_battery_sensor_binary + true + false + no + Set to true if using a binary battery sensor. Will ignore battery_warning percentage settings + + + ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state + off + on + no + Set whether the binary sensor turns to on or off when in low state + ??? note "Template Code" diff --git a/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml b/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml index 4c2447996..8a20e4b99 100644 --- a/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml @@ -7,6 +7,8 @@ custom_card_eraycetinay_lock: variables: ulm_custom_card_eraycetinay_lock_battery_warning: 20 ulm_custom_card_eraycetinay_lock_battery_warning_low: 5 + ulm_custom_card_eraycetinay_lock_battery_sensor_binary: false + ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state: "on" tap_action: action: | [[[ @@ -89,10 +91,16 @@ custom_card_eraycetinay_lock: - background-color: | [[[ if (variables.ulm_custom_card_eraycetinay_lock_battery_level !== undefined) { - if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning_low) { - return "rgba(var(--color-red),1)"; - } else if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning) { - return "rgba(var(--color-yellow),1)"; + if (variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary) { + if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state == variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state) { + return "rgba(var(--color-red),1)"; + } + } else { + if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning_low) { + return "rgba(var(--color-red),1)"; + } else if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning) { + return "rgba(var(--color-yellow),1)"; + } } } ]]] @@ -106,10 +114,18 @@ custom_card_eraycetinay_lock: notification_battery: > [[[ if (variables.ulm_custom_card_eraycetinay_lock_battery_level !== undefined) { - if (variables.ulm_custom_card_eraycetinay_lock_battery_warning >= states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state) { - return ` - - `; + if (variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary) { + if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state == variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state) { + return ` + + `; + } + } else { + if (variables.ulm_custom_card_eraycetinay_lock_battery_warning >= states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state) { + return ` + + `; + } } } ]]] diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml index ecfc032b4..d97a28f11 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "blockiert" ulm_custom_card_eraycetinay_lock_locked_and_opened: "Die Tür ist verschlossen, aber noch offen." ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterie ist an" + ulm_custom_card_eraycetinay_lock_battery_is_low: "Batterie schwach" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml index 62efd41ff..81579b70b 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "jammed" ulm_custom_card_eraycetinay_lock_locked_and_opened: "The door is locked but still open." ulm_custom_card_eraycetinay_lock_battery_is_at: "Battery is at" + ulm_custom_card_eraycetinay_lock_battery_is_low: "Battery is low" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml index 40bed3d92..3281e2ee1 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "apretada" ulm_custom_card_eraycetinay_lock_locked_and_opened: "La puerta está cerrada pero aún abierta." ulm_custom_card_eraycetinay_lock_battery_is_at: "la batería está en" + ulm_custom_card_eraycetinay_lock_battery_is_low: "La batería está baja" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml index f9e1b7509..edfaba02f 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "zacięty" ulm_custom_card_eraycetinay_lock_locked_and_opened: "Drzwi są zamknięte, ale nadal otwarte." ulm_custom_card_eraycetinay_lock_battery_is_at: "Bateria jest na" + ulm_custom_card_eraycetinay_lock_battery_is_low: "Bateria jest słaba" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml index 7a9ca5121..858d90629 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "fastnat" ulm_custom_card_eraycetinay_lock_locked_and_opened: "Dörren är låst men fortfarande öppen." ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterinivån är" + ulm_custom_card_eraycetinay_lock_battery_is_low: "Batteriet är lågt" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml index 5aab9bdd3..71087a982 100644 --- a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml +++ b/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml @@ -9,3 +9,4 @@ custom_card_eraycetinay_lock_language_variables: ulm_custom_card_eraycetinay_lock_jammed: "sıkışmış" ulm_custom_card_eraycetinay_lock_locked_and_opened: "Kapı kilitli ama hala açık" ulm_custom_card_eraycetinay_lock_battery_is_at: "pil" + ulm_custom_card_eraycetinay_lock_battery_is_low: "pil zayıf" From 16e41f468bf2490f0ff25e8e75d8cc0febb10159 Mon Sep 17 00:00:00 2001 From: basbruss Date: Wed, 3 Jul 2024 12:00:01 +0000 Subject: [PATCH 13/37] Update docs --- .../custom_cards/custom_card_eraycetinay_lock.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/usage/custom_cards/custom_card_eraycetinay_lock.md b/docs/usage/custom_cards/custom_card_eraycetinay_lock.md index 364e3d5aa..26aebb13c 100644 --- a/docs/usage/custom_cards/custom_card_eraycetinay_lock.md +++ b/docs/usage/custom_cards/custom_card_eraycetinay_lock.md @@ -107,6 +107,20 @@ Version: 0.0.3 no Displays a warning when the door is lock but the door is still open. + + ulm_custom_card_eraycetinay_lock_battery_sensor_binary + true + false + no + Set to true if using a binary battery sensor. Will ignore battery_warning percentage settings + + + ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state + off + on + no + Set whether the binary sensor turns to on or off when in low state + ??? note "Template Code" From 1312db8c93b38e422aa21f08a78e42b380448d5c Mon Sep 17 00:00:00 2001 From: wilbiev Date: Wed, 3 Jul 2024 19:47:02 +0000 Subject: [PATCH 14/37] Updated documentation --- docs/setup/download.md | 11 +++++--- docs/setup/installation.md | 53 ++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/docs/setup/download.md b/docs/setup/download.md index feb29dd90..51ce34cc8 100644 --- a/docs/setup/download.md +++ b/docs/setup/download.md @@ -3,7 +3,9 @@ title: Prepare & Download hide: - toc --- + + Before get started on anything, make sure you have created a backup of your home assistant configuration. > In case you experience problems during installation please reach join the [Discord Server](https://discord.gg/TPXg9b7GfR). @@ -15,7 +17,7 @@ You should have a HomeAssistant (HA) instance running, preferably with [HACS](ht You have access to your `config` folder of HA. Doesn’t matter which way this is, but you need to be able to upload and change files in your config. If you’re running `HA-OS` or a `supervised install` of HA, we highly recommend the [Samba AddOn](https://www.home-assistant.io/common-tasks/supervised/#installing-and-using-the-samba-add-on) (see the AddOn page for instructions) and for editing the File editor AddOn or a good editor like [Notepad++](https://notepad-plus-plus.org/) or [SublimeText](https://www.sublimetext.com/) for your OS. !!! danger "Breaking Changes" - This integration is still under heavy development and might cause breaking changes +This integration is still under heavy development and might cause breaking changes ## HACS Download @@ -54,13 +56,16 @@ In order to function correctly, the UI Lovelace Mininmalist "Theme" requires som - [card-mod](https://github.com/thomasloven/lovelace-card-mod) by Thomas Lovén - [mini-graph-card](https://github.com/kalkih/mini-graph-card) by Karl Kihlström - [Mini Media Player](https://github.com/kalkih/mini-media-player) by Karl Kihlström -- [My Cards Bundle](https://github.com/AnthonMS/my-cards) by AnthonMS** +- [My Cards Bundle](https://github.com/AnthonMS/my-cards) by AnthonMS\*\* - [Light Entity Card](https://github.com/ljmerza/light-entity-card) by Leonardo Merza - [auto-entities](https://github.com/thomasloven/lovelace-auto-entities) by Thomas Lovén +- [weather-radar-card](https://github.com/Makin-Things/weather-radar-card) by Makin-Things +- [lovelace-layout-card](https://github.com/thomasloven/lovelace-layout-card) by Thomas Lovén +- [lovelace-state-swtch](https://github.com/thomasloven/lovelace-state-switch) by Thomas Lovén You can install these via HACS or manually. -Some resources (as marked above with **) might not be available in HACS by default. +Some resources (as marked above with \*\*) might not be available in HACS by default. To find and install these using HACS, first add them as [custom repositories](https://hacs.xyz/docs/faq/custom_repositories/). ### Download Release File diff --git a/docs/setup/installation.md b/docs/setup/installation.md index eb27218cf..4786fa0e6 100644 --- a/docs/setup/installation.md +++ b/docs/setup/installation.md @@ -26,20 +26,20 @@ Now you can configure the Integration, you can do this also after it's installed ![hacs_integration_config](../assets/img/setup/hacs_integration_config.png) -- *Language*: Will set the language for the Integration. -- *Enable creation of a Dashboard entry in the Side panel*: If you want to add an Entry in the Side Panel for the auto generated Dashboard. (Still under heavy development!) -- *Side panel title*: Will set the title for the Lovelace Dashboard in the Sidebar. -- *Side panel icon*: Which icon to put in front of the Title. -- *Enable adaptive Dashboard with popup splitview*: Creates an entry for the [adaptive dashboard](adaptive_dash.md) -- *Adaptive panel title*: Will set the title for the adaptive dashboard in the Sidebar. -- *Adaptive panel icon*: Which icon to put in front of the adaptive dashboard sidebar entry. -- *Theme*: Choose a theme of your choice (Note: Both themes will be installed anyway and can be customized later if needed.) +- _Language_: Will set the language for the Integration. +- _Enable creation of a Dashboard entry in the Side panel_: If you want to add an Entry in the Side Panel for the auto generated Dashboard. (Still under heavy development!) +- _Side panel title_: Will set the title for the Lovelace Dashboard in the Sidebar. +- _Side panel icon_: Which icon to put in front of the Title. +- _Enable adaptive Dashboard with popup splitview_: Creates an entry for the [adaptive dashboard](adaptive_dash.md) +- _Adaptive panel title_: Will set the title for the adaptive dashboard in the Sidebar. +- _Adaptive panel icon_: Which icon to put in front of the adaptive dashboard sidebar entry. +- _Theme_: Choose a theme of your choice (Note: Both themes will be installed anyway and can be customized later if needed.) !!! note "" Currently, it may happen that themes are not automatically selected correctly for you in all cases automatically. Please make sure that the minimalist theme is correctly selected in your Home Assistant settings (click on your profile picture in Home Assistant, bottom left). -- *Theme path*: Make sure this is set to the same path as is configured in your `configuration.yaml` (default: `themes/`) +- _Theme path_: Make sure this is set to the same path as is configured in your `configuration.yaml` (default: `themes/`) !!! note "" @@ -52,24 +52,27 @@ Now you can configure the Integration, you can do this also after it's installed You will also need to change your user theme to the chosen theme or else no visual modifications will work. -- *Include Custom Cards*: This will make sure almost all dependency cards are included and configured for you. +- _Include Custom Cards_: This will make sure almost all dependency cards are included and configured for you. !!! danger "" Activate **"Include Custom Cards"** only if you have not already installed the required Lovelace resources yourself, or if you dont want to install them by yourself. Otherwise this can currently lead to a freeze of the frontend due to double loaded lovelace resources. -| Included lovelace resources | -| ----------------------------------------------------------------------- | -| [`button-card`](https://github.com/custom-cards/button-card) | -| [`lovelace-card-mod`](https://github.com/thomasloven/lovelace-card-mod) | -| [`mini-graph-card`](https://github.com/kalkih/mini-graph-card) | -| [`mini-media-player`](https://github.com/kalkih/mini-media-player) | -| [`my-cards-slider-card`](https://github.com/AnthonMS/my-cards) | -| [`light-entity-card`](https://github.com/ljmerza/light-entity-card) | -| [`auto-entities`](https://github.com/thomasloven/lovelace-auto-entities)| -| [`simple-weather-card`](https://github.com/kalkih/simple-weather-card) | - -- *Select Community Cards you want to enable*: Selected [custom cards](custom_cards.md) will be downloaded automatically to enable usage. Requires a GitHub account. Restart or reload your configuration after toggling this setting. If needed, a notification will appear, indicating that GitHub needs to be set up. You will be prompted to go to your integrations and to reconfigure this integration. Selecting "reconfigure" on your Lovelace Minimalist UI integration, the GitHub-Login-flow will start. You might need to restart HomeAssistant, when your selected community cards change. +| Included lovelace resources | +| ------------------------------------------------------------------------------ | +| [`button-card`](https://github.com/custom-cards/button-card) | +| [`lovelace-card-mod`](https://github.com/thomasloven/lovelace-card-mod) | +| [`mini-graph-card`](https://github.com/kalkih/mini-graph-card) | +| [`mini-media-player`](https://github.com/kalkih/mini-media-player) | +| [`my-cards-slider-card`](https://github.com/AnthonMS/my-cards) | +| [`light-entity-card`](https://github.com/ljmerza/light-entity-card) | +| [`auto-entities`](https://github.com/thomasloven/lovelace-auto-entities) | +| [`simple-weather-card`](https://github.com/kalkih/simple-weather-card) | +| [`weather-radar-card`](https://github.com/Makin-Things/weather-radar-card) | +| [`lovelace-layout-card`](https://github.com/thomasloven/lovelace-layout-card) | +| [`lovelace-state-swtch`](https://github.com/thomasloven/lovelace-state-switch) | + +- _Select Community Cards you want to enable_: Selected [custom cards](custom_cards.md) will be downloaded automatically to enable usage. Requires a GitHub account. Restart or reload your configuration after toggling this setting. If needed, a notification will appear, indicating that GitHub needs to be set up. You will be prompted to go to your integrations and to reconfigure this integration. Selecting "reconfigure" on your Lovelace Minimalist UI integration, the GitHub-Login-flow will start. You might need to restart HomeAssistant, when your selected community cards change. Hit submit and in the Sidebar a new Dashboard entry should appear. A new file for the dashboard configuration, with a small example, where you can generate your own layout should have been created under that location: @@ -77,9 +80,9 @@ A new file for the dashboard configuration, with a small example, where you can ```yaml config └── ui_lovelace_minimalist - ├── custom_cards - └── dashboard - └── ui-lovelace.yaml +├── custom_cards +└── dashboard +└── ui-lovelace.yaml ``` In case you want to use your own ui-lovelace files go to [Configuration](../configuration). From 7451d3d801f37bb9493c69210beb67d9e6cb79dd Mon Sep 17 00:00:00 2001 From: wilbiev Date: Fri, 5 Jul 2024 14:40:27 +0000 Subject: [PATCH 15/37] Updated documentation --- docs/setup/download.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/setup/download.md b/docs/setup/download.md index 51ce34cc8..71802a104 100644 --- a/docs/setup/download.md +++ b/docs/setup/download.md @@ -59,6 +59,7 @@ In order to function correctly, the UI Lovelace Mininmalist "Theme" requires som - [My Cards Bundle](https://github.com/AnthonMS/my-cards) by AnthonMS\*\* - [Light Entity Card](https://github.com/ljmerza/light-entity-card) by Leonardo Merza - [auto-entities](https://github.com/thomasloven/lovelace-auto-entities) by Thomas Lovén +- [simple-weather-card](https://github.com/kalkih/simple-weather-card) by Karl Kihlström - [weather-radar-card](https://github.com/Makin-Things/weather-radar-card) by Makin-Things - [lovelace-layout-card](https://github.com/thomasloven/lovelace-layout-card) by Thomas Lovén - [lovelace-state-swtch](https://github.com/thomasloven/lovelace-state-switch) by Thomas Lovén From 8e0ed6c347c86a82fd1da59198143788dc8438c0 Mon Sep 17 00:00:00 2001 From: wilbiev Date: Fri, 5 Jul 2024 16:55:54 +0000 Subject: [PATCH 16/37] Fix for hanging when not using GitHub option --- .../ui_lovelace_minimalist/__init__.py | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/__init__.py b/custom_components/ui_lovelace_minimalist/__init__.py index 8a41bc470..411fa28f1 100644 --- a/custom_components/ui_lovelace_minimalist/__init__.py +++ b/custom_components/ui_lovelace_minimalist/__init__.py @@ -13,7 +13,7 @@ from homeassistant.loader import async_get_integration from .base import UlmBase -from .const import DOMAIN, NAME +from .const import DOMAIN, NAME, DOMAIN_DATA from .enums import ConfigurationType, UlmDisabledReason _LOGGER: logging.Logger = logging.getLogger(__package__) @@ -113,13 +113,26 @@ async def async_startup(): async def async_setup(hass: HomeAssistant, config: dict): """Set up this integration using UI.""" - return await async_initialize_integration(hass=hass, config=config) + if config.get(DOMAIN) is None: + # We get here if the integration is set up using config flow + return True + + hass.data.setdefault(DOMAIN_DATA, config[DOMAIN]) + hass.async_create_task( + hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_IMPORT}, data=hass.data[DOMAIN_DATA] + ) + ) + # Return boolean to indicate that initialization was successful. + return True async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool: """Set up this integration using UI.""" - config_entry.add_update_listener(config_entry_update_listener) + config_entry.async_on_unload( + config_entry.add_update_listener(config_entry_update_listener) + ) return await async_initialize_integration(hass=hass, config_entry=config_entry) @@ -133,13 +146,6 @@ async def async_remove_entry(hass: HomeAssistant, config_entry: ConfigEntry): async_remove_panel(hass, "ui-lovelace-minimalist") -async def async_reload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> None: - """Reload Integration.""" - _LOGGER.debug("Reload the config entry") - - await async_setup_entry(hass, config_entry) - - async def config_entry_update_listener( hass: HomeAssistant, config_entry: ConfigEntry ) -> None: From da6481f3300058010dbf2534bc37042e6504053d Mon Sep 17 00:00:00 2001 From: wilbiev Date: Fri, 5 Jul 2024 17:32:15 +0000 Subject: [PATCH 17/37] Fix for hanging when not using GitHub option --- custom_components/ui_lovelace_minimalist/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/__init__.py b/custom_components/ui_lovelace_minimalist/__init__.py index 411fa28f1..e40cc9c3e 100644 --- a/custom_components/ui_lovelace_minimalist/__init__.py +++ b/custom_components/ui_lovelace_minimalist/__init__.py @@ -13,7 +13,7 @@ from homeassistant.loader import async_get_integration from .base import UlmBase -from .const import DOMAIN, NAME, DOMAIN_DATA +from .const import DOMAIN, DOMAIN_DATA, NAME from .enums import ConfigurationType, UlmDisabledReason _LOGGER: logging.Logger = logging.getLogger(__package__) From 86ff36c7edb9dfed2ffd197ffe9d01c8739213ef Mon Sep 17 00:00:00 2001 From: wilbiev Date: Fri, 5 Jul 2024 17:48:33 +0000 Subject: [PATCH 18/37] Fix for hanging when not using GitHub option --- .../custom_card_sisimomo_printer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml b/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml index efe166995..b80018dd8 100644 --- a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml +++ b/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml @@ -192,7 +192,7 @@ custom_card_sisimomo_printer: filter: opacity(40%); font-size: medium; } - + /* Error CSS */ div#cartridges .error-container { text-align: left; From c82bce7270831ca04e39df5e6e9a736023314634 Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 6 Oct 2024 12:15:35 +0000 Subject: [PATCH 19/37] Update call-service to perform-action --- .../card_templates/cards/card_cover.yaml | 42 +++++------ .../card_templates/cards/card_fan.yaml | 6 +- .../card_templates/cards/card_light.yaml | 18 ++--- .../cards/card_media_player.yaml | 36 +++++----- .../card_templates/cards/card_room.yaml | 14 ++-- .../card_templates/cards/card_thermostat.yaml | 66 ++++++++--------- .../card_templates/cards/card_vacuum.yaml | 30 ++++---- .../cards/card_vertical_button.yaml | 6 +- .../cards/card_welcome_scenes.yaml | 18 ++--- .../vertical_buttons_custom_state.yaml | 6 +- .../popup_button_airconditionner.yaml | 6 +- .../popup_buttons/popup_chip_controls.yaml | 18 ++--- .../popup_layouts/popup_light_effect_row.yaml | 6 +- .../popup_light_palette_row.yaml | 6 +- .../popup_layouts/popup_media_player_row.yaml | 6 +- .../popup_templates/popups/popup_cover.yaml | 18 ++--- .../popups/popup_thermostat_temperature.yaml | 72 +++++++++---------- 17 files changed, 187 insertions(+), 187 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml index fd3d50927..5caf0c47b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml @@ -391,9 +391,9 @@ card_cover: icon: - color: "rgba(var(--color-theme),0.4)" tap_action: - action: "call-service" - service: "cover.close_cover" - service_data: + action: "perform-action" + perform_action: "cover.close_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: > [[[ @@ -441,9 +441,9 @@ card_cover: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "cover.stop_cover" - service_data: + action: "perform-action" + perform_action: "cover.stop_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: "mdi:stop" item3: @@ -506,9 +506,9 @@ card_cover: icon: - color: "rgba(var(--color-theme),0.4)" tap_action: - action: "call-service" - service: "cover.open_cover" - service_data: + action: "perform-action" + perform_action: "cover.open_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: >- [[[ @@ -556,9 +556,9 @@ card_cover: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "cover.set_cover_position" - service_data: + action: "perform-action" + perform_action: "cover.set_cover_position" + target: entity_id: "[[[ return entity.entity_id ]]]" position: "[[[ return variables.ulm_card_cover_favorite_percentage ]]]" icon: "mdi:star" @@ -695,9 +695,9 @@ card_cover: icon: - color: "rgba(var(--color-theme),0.4)" tap_action: - action: "call-service" - service: "cover.close_cover_tilt" - service_data: + action: "perform-action" + perform_action: "cover.close_cover_tilt" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: "mdi:arrow-bottom-left" item2: @@ -735,9 +735,9 @@ card_cover: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "cover.stop_cover_tilt" - service_data: + action: "perform-action" + perform_action: "cover.stop_cover_tilt" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: "mdi:stop" item3: @@ -800,8 +800,8 @@ card_cover: icon: - color: "rgba(var(--color-theme),0.4)" tap_action: - action: "call-service" - service: "cover.open_cover_tilt" - service_data: + action: "perform-action" + perform_action: "cover.open_cover_tilt" + target: entity_id: "[[[ return entity.entity_id ]]]" icon: "mdi:arrow-top-right" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml index d5c88ce7d..1b5dd42e0 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml @@ -263,9 +263,9 @@ card_fan: icon: "[[[ return variables.ulm_card_fan_button_icon ]]]" entity: "[[[ return entity.entity_id ]]]" tap_action: - action: "call-service" - service: "[[[ return variables.ulm_card_fan_button_service ]]]" - service_data: + action: "perform-action" + perform_action: "[[[ return variables.ulm_card_fan_button_service ]]]" + target: entity_id: "[[[ return entity.entity_id ]]]" oscillating: "[[[ return !entity.attributes[variables.ulm_card_fan_oscillate_attribute] ]]]" state: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml index 95abd3360..95813002b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml @@ -331,9 +331,9 @@ card_light: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "light.turn_on" - service_data: + action: "perform-action" + perform_action: "light.turn_on" + target: entity_id: "[[[ return entity.entity_id ]]]" brightness_pct: "[[[ return variables.ulm_card_light_brightness_low ]]]" icon: "mdi:lightbulb-on-10" @@ -383,9 +383,9 @@ card_light: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "light.turn_on" - service_data: + action: "perform-action" + perform_action: "light.turn_on" + target: entity_id: "[[[ return entity.entity_id ]]]" brightness_pct: "[[[ return variables.ulm_card_light_brightness_medium ]]]" icon: "mdi:lightbulb-on-50" @@ -435,9 +435,9 @@ card_light: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "light.turn_on" - service_data: + action: "perform-action" + perform_action: "light.turn_on" + target: entity_id: "[[[ return entity.entity_id ]]]" brightness_pct: "[[[ return variables.ulm_card_light_brightness_high ]]]" icon: "mdi:lightbulb-on" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml index 325c2eca3..dafb2b4f4 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml @@ -371,9 +371,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id ]]]" tap_action: - action: "call-service" - service: "media_player.media_previous_track" - service_data: + action: "perform-action" + perform_action: "media_player.media_previous_track" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" icon: "mdi:skip-previous" entity: "[[[ return entity.entity_id ]]]" @@ -432,9 +432,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id; ]]]" tap_action: - action: "call-service" - service: "[[[ return (entity.attributes?.media_duration > 0) ? 'media_player.media_play_pause' : entity.state =='playing' ? 'media_player.media_stop' : 'media_player.media_play']]]" - service_data: + action: "perform-action" + perform_action: "[[[ return (entity.attributes?.media_duration > 0) ? 'media_player.media_play_pause' : entity.state =='playing' ? 'media_player.media_stop' : 'media_player.media_play']]]" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" icon: "[[[ return (entity.attributes?.media_duration > 0) ? 'mdi:pause' : 'mdi:stop' ]]]" state: @@ -502,9 +502,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id; ]]]" tap_action: - action: "call-service" - service: "media_player.media_next_track" - service_data: + action: "perform-action" + perform_action: "media_player.media_next_track" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" icon: "mdi:skip-next" styles: @@ -700,9 +700,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id; ]]]" tap_action: - action: "call-service" - service: "media_player.volume_mute" - service_data: + action: "perform-action" + perform_action: "media_player.volume_mute" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" is_volume_muted: "[[[ return (states[entity.entity_id].attributes.is_volume_muted) ? false : true; ]]]" icon: "mdi:volume-mute" @@ -761,9 +761,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id; ]]]" tap_action: - action: "call-service" - service: "media_player.volume_set" - service_data: + action: "perform-action" + perform_action: "media_player.volume_set" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" volume_level: | [[[ @@ -841,9 +841,9 @@ card_media_player: template: "popup_media_player_infos" entity: "[[[ return entity.entity_id; ]]]" tap_action: - action: "call-service" - service: "media_player.volume_set" - service_data: + action: "perform-action" + perform_action: "media_player.volume_set" + target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" volume_level: | [[[ diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml index 0cc571673..9c23e658c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml @@ -6,9 +6,9 @@ card_room: label_use_temperature: true label_use_brightness: false double_tap_action: - action: "call-service" - service: "input_select.select_option" - service_data: + action: "perform-action" + perform_action: "input_select.select_option" + target: option: "[[[ return variables.ulm_input_select_option ]]]" entity_id: "[[[ return variables.ulm_input_select ]]]" color: "var(--google-grey-500)" @@ -207,15 +207,15 @@ widget_icon_room: entity: "[[[ return variables.tap_action.entity; ]]]" navigation_path: "[[[ return variables.tap_action.navigation_path; ]]]" url_path: "[[[ return variables.tap_action.url_path; ]]]" - service: "[[[ return variables.tap_action.service; ]]]" - service_data: "[[[ return variables.tap_action.service_data; ]]]" + perform_action: "[[[ return variables.tap_action.service; ]]]" + target: "[[[ return variables.tap_action.service_data; ]]]" hold_action: action: "[[[ return variables?.hold_action?.action ? variables.hold_action.action : 'none'; ]]]" entity: "[[[ return variables.hold_action.entity; ]]]" navigation_path: "[[[ return variables.hold_action.navigation_path; ]]]" url_path: "[[[ return variables.hold_action.url_path; ]]]" - service: "[[[ return variables.hold_action.service; ]]]" - service_data: "[[[ return variables.hold_action.service_data; ]]]" + perform_action: "[[[ return variables.hold_action.service; ]]]" + target: "[[[ return variables.hold_action.service_data; ]]]" size: "15px" color: "var(--google-grey)" show_icon: true diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml index 0daa1f9cd..4ac8e9510 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml @@ -222,9 +222,9 @@ card_thermostat: entity: "[[[ return entity.entity_id ]]]" icon: "mdi:minus" tap_action: - action: "call-service" - service: "climate.set_temperature" - service_data: + action: "perform-action" + perform_action: "climate.set_temperature" + target: target_temp_low: | [[[ if (entity.attributes.target_temp_low == null) { @@ -292,9 +292,9 @@ card_thermostat: entity: "[[[ return entity.entity_id ]]]" icon: "mdi:plus" tap_action: - action: "call-service" - service: "climate.set_temperature" - service_data: + action: "perform-action" + perform_action: "climate.set_temperature" + target: target_temp_low: | [[[ if (entity.attributes.target_temp_low == null) { @@ -348,9 +348,9 @@ card_thermostat: entity: "[[[ return entity.entity_id ]]]" icon: "mdi:minus" tap_action: - action: "call-service" - service: "climate.set_temperature" - service_data: + action: "perform-action" + perform_action: "climate.set_temperature" + target: target_temp_low: | [[[ const unit = hass.config.unit_system.temperature @@ -394,9 +394,9 @@ card_thermostat: entity: "[[[ return entity.entity_id ]]]" icon: "mdi:plus" tap_action: - action: "call-service" - service: "climate.set_temperature" - service_data: + action: "perform-action" + perform_action: "climate.set_temperature" + target: target_temp_low: | [[[ const unit = hass.config.unit_system.temperature @@ -554,9 +554,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:autorenew" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "auto" state: @@ -584,9 +584,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:fire" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "heat" state: @@ -614,9 +614,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:snowflake" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "cool" state: @@ -644,9 +644,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:water" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "dry" state: @@ -674,9 +674,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:sun-snowflake" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "heat_cool" state: @@ -704,9 +704,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:fan" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "fan_only" state: @@ -734,9 +734,9 @@ card_thermostat: template: "widget_icon" icon: "mdi:fan" tap_action: - action: "call-service" - service: "fan.toggle" - service_data: + action: "perform-action" + perform_action: "fan.toggle" + target: entity_id: "[[[ return variables.ulm_card_thermostat_fan_entity !== null ? states[variables.ulm_card_thermostat_fan_entity].entity_id : null ]]]" state: - operator: "template" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml index 6cf727789..928010263 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml @@ -252,17 +252,17 @@ card_vacuum: value: "[[[ return ['cleaning','mopping'].includes(entity.state.toLowerCase()) ]]]" icon: "mdi:stop" tap_action: - action: "call-service" - service: "vacuum.stop" - service_data: + action: "perform-action" + perform_action: "vacuum.stop" + target: entity_id: "[[[ return entity.entity_id ]]]" tap_action: - action: "call-service" - service: > + action: "perform-action" + perform_action: > [[[ return ['cleaning','mopping'].includes(entity.state.toLowerCase()) ? "vacuum.stop" : "vacuum.start"; ]]] - service_data: + target: entity_id: "[[[ return entity.entity_id ]]]" item2: card: @@ -297,9 +297,9 @@ card_vacuum: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "vacuum.return_to_base" - service_data: + action: "perform-action" + perform_action: "vacuum.return_to_base" + target: entity_id: "[[[ return entity.entity_id ]]]" item3: card: @@ -334,9 +334,9 @@ card_vacuum: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "vacuum.locate" - service_data: + action: "perform-action" + perform_action: "vacuum.locate" + target: entity_id: "[[[ return entity.entity_id ]]]" item4: card: @@ -371,7 +371,7 @@ card_vacuum: return 'rgba(var(--color-theme),0.9)'; ]]] tap_action: - action: "call-service" - service: "script.turn_on" - service_data: + action: "perform-action" + perform_action: "script.turn_on" + target: entity_id: "[[[ return variables.ulm_card_vacuum_room ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml index 1667d8e9d..4eaadb039 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml @@ -59,8 +59,8 @@ card_vertical_button: card: - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_card_vertical_button_color}), var(--opacity-bg))`; ]]]" tap_action: - action: "call-service" - service: | + action: "perform-action" + perform_action: | [[[ if( entity.entity_id.startsWith("input_select.") ) return "input_select.select_option"; @@ -85,7 +85,7 @@ card_vertical_button: // If we need to support other entities we can add these options here. return ""; ]]] - service_data: | + target: | [[[ var obj; if( entity.entity_id.startsWith("input_select.") ) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_welcome_scenes.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_welcome_scenes.yaml index 8ad6c4697..b1243551c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_welcome_scenes.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_welcome_scenes.yaml @@ -284,9 +284,9 @@ card_scenes_pill_welcome: if(variables?.nav_path){ return "navigate" } - return "call-service" + return "perform-action" ]]] - service: > + perform_action: > [[[ if(entity?.entity_id.startsWith("scene.")){ return "scene.turn_on" @@ -303,7 +303,7 @@ card_scenes_pill_welcome: return "homeassistant.toggle" ]]] navigation_path: "[[[ return variables?.nav_path; ]]]" - service_data: | + target: | [[[ if (variables.service_data){ return variables.service_data @@ -371,10 +371,10 @@ card_scenes_pill_welcome: if(variables?.nav_path){ return "navigate" } - return "call-service" + return "perform-action" ]]] navigation_path: "[[[ return variables?.nav_path; ]]]" - service: > + perform_action: > [[[ if(entity?.entity_id.startsWith("scene.")){ return "scene.turn_on" @@ -390,7 +390,7 @@ card_scenes_pill_welcome: } return "homeassistant.toggle" ]]] - service_data: | + target: | [[[ if (variables.service_data){ return variables.service_data @@ -451,9 +451,9 @@ card_topbar_welcome: icon: - color: "rgb(var(--color-theme))" tap_action: - action: "call-service" - service: "input_boolean.toggle" - service_data: + action: "perform-action" + perform_action: "input_boolean.toggle" + target: entity_id: "[[[ return variables.ulm_card_welcome_scenes_collapse ]]]" item2: card: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml index 3789c36f4..d1cec32e6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml @@ -26,8 +26,8 @@ vertical_buttons_custom_state: card: - background-color: "[[[ return `rgba(var(--color-background-${variables.color}), var(--opacity-bg))`; ]]]" tap_action: - action: "call-service" - service: "input_select.select_option" - service_data: + action: "perform-action" + perform_action: "input_select.select_option" + target: entity_id: "[[[ return entity.entity_id ]]]" option: "[[[ return variables.state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml index 3923d0f91..75b194687 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml @@ -16,8 +16,8 @@ popup_button_airconditionner: - transform: "scale(0.95)" value: "[[[ return variables.ulm_popup_button_airconditionner_state ]]]" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "climate.hvac" hvac_mode: "[[[ return variables.ulm_popup_button_airconditionner_state ]]]" 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 5b0a12023..2027d150d 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 @@ -21,9 +21,9 @@ popup_chip_controls: entity: "[[[ return entity.entity_id; ]]]" icon: "mdi:skip-previous" tap_action: - action: "call-service" - service: "media_player.media_previous_track" - service_data: + action: "perform-action" + perform_action: "media_player.media_previous_track" + target: entity_id: "[[[ return entity.entity_id; ]]]" styles: icon: @@ -45,9 +45,9 @@ popup_chip_controls: - value: "playing" icon: "mdi:pause" tap_action: - action: "call-service" - service: "media_player.media_play_pause" - service_data: + action: "perform-action" + perform_action: "media_player.media_play_pause" + target: entity_id: "[[[ return entity.entity_id; ]]]" item3: card: @@ -56,9 +56,9 @@ popup_chip_controls: entity: "[[[ return entity.entity_id; ]]]" icon: "mdi:skip-next" tap_action: - action: "call-service" - service: "media_player.media_next_track" - service_data: + action: "perform-action" + perform_action: "media_player.media_next_track" + target: entity_id: "[[[ return entity.entity_id; ]]]" styles: icon: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml index 9969245b7..e6f078827 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml @@ -17,8 +17,8 @@ popup_light_effect_row: name: - color: "rgba(var(--color-blue),1)" tap_action: - action: "call-service" - service: "light.turn_on" - service_data: + action: "perform-action" + perform_action: "light.turn_on" + target: entity_id: "[[[ return entity.entity_id; ]]]" effect: "[[[ return entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml index ca4f4cbde..d613a1a26 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml @@ -16,8 +16,8 @@ popup_light_palette_row: name: - color: "rgba(var(--color-blue),1)" tap_action: - action: "call-service" - service: "select.select_option" - service_data: + action: "perform-action" + perform_action: "select.select_option" + target: entity_id: "[[[ return entity.entity_id; ]]]" option: "[[[ return entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml index 3b1f4f478..60da76cc5 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml @@ -16,8 +16,8 @@ popup_media_player_row: name: - color: "rgba(var(--color-blue),1)" tap_action: - action: "call-service" - service: "media_player.select_source" - service_data: + action: "perform-action" + perform_action: "media_player.select_source" + target: entity_id: "[[[ return entity.entity_id; ]]]" source: "[[[ return entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_cover.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_cover.yaml index 5b26a7602..4025d2a8e 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_cover.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_cover.yaml @@ -122,9 +122,9 @@ popup_cover: } ]]] tap_action: - action: "call-service" - service: "cover.close_cover" - service_data: + action: "perform-action" + perform_action: "cover.close_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" item2: card: @@ -135,9 +135,9 @@ popup_cover: - "popup_button" - "popup_button_cover_stop" tap_action: - action: "call-service" - service: "cover.stop_cover" - service_data: + action: "perform-action" + perform_action: "cover.stop_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" item3: card: @@ -164,9 +164,9 @@ popup_cover: } ]]] tap_action: - action: "call-service" - service: "cover.open_cover" - service_data: + action: "perform-action" + perform_action: "cover.open_cover" + target: entity_id: "[[[ return entity.entity_id ]]]" footer: card: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml index f385ff374..f23788759 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml @@ -279,9 +279,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:autorenew" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "auto" styles: @@ -305,9 +305,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:fire" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "heat" styles: @@ -331,9 +331,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:snowflake" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "cool" styles: @@ -357,9 +357,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:water" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "dry" styles: @@ -383,9 +383,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:fan" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "fan_only" styles: @@ -409,9 +409,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:sun-snowflake" tap_action: - action: "call-service" - service: "climate.set_hvac_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_hvac_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" hvac_mode: "heat_cool" styles: @@ -435,9 +435,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:toggle-switch-off" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('none') ? 'none' : 'None'} ]]]" styles: @@ -462,9 +462,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:home-switch-outline" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('away') ? 'away' : 'Away'} ]]]" styles: @@ -489,9 +489,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:car-seat-cooler" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('comfort') ? 'comfort' : 'Comfort'} ]]]" styles: @@ -516,9 +516,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:home" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('home') ? 'home' : 'Home'} ]]]" styles: @@ -543,9 +543,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:sleep" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('sleep') ? 'sleep' : 'Sleep'} ]]]" styles: @@ -570,9 +570,9 @@ popup_thermostat_temperature: template: "widget_icon" icon: "mdi:ticket" tap_action: - action: "call-service" - service: "climate.set_preset_mode" - service_data: + action: "perform-action" + perform_action: "climate.set_preset_mode" + target: entity_id: "[[[ return entity.entity_id ]]]" preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('activity') ? 'activity' : 'Activity'} ]]]" styles: From 71a26382eba84cf4f29d2aa404ed11dd4029acfc Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 20 Oct 2024 17:53:28 +0000 Subject: [PATCH 20/37] Add data label to perform_action --- .../card_templates/cards/card_cover.yaml | 1 + .../card_templates/cards/card_fan.yaml | 1 + .../card_templates/cards/card_light.yaml | 3 +++ .../cards/card_media_player.yaml | 3 +++ .../card_templates/cards/card_room.yaml | 3 ++- .../card_templates/cards/card_thermostat.yaml | 18 ++++++++++++++---- .../vertical_buttons_custom_state.yaml | 1 + .../popup_button_airconditionner.yaml | 1 + .../popup_layouts/popup_light_effect_row.yaml | 1 + .../popup_layouts/popup_light_palette_row.yaml | 1 + .../popup_layouts/popup_media_player_row.yaml | 1 + .../popups/popup_thermostat_temperature.yaml | 12 ++++++++++++ 12 files changed, 41 insertions(+), 5 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml index 5caf0c47b..7dfa80314 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml @@ -560,6 +560,7 @@ card_cover: perform_action: "cover.set_cover_position" target: entity_id: "[[[ return entity.entity_id ]]]" + data: position: "[[[ return variables.ulm_card_cover_favorite_percentage ]]]" icon: "mdi:star" item3: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml index 1b5dd42e0..eefda8c75 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_fan.yaml @@ -267,6 +267,7 @@ card_fan: perform_action: "[[[ return variables.ulm_card_fan_button_service ]]]" target: entity_id: "[[[ return entity.entity_id ]]]" + data: oscillating: "[[[ return !entity.attributes[variables.ulm_card_fan_oscillate_attribute] ]]]" state: - operator: "template" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml index 95813002b..dd2180f87 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml @@ -335,6 +335,7 @@ card_light: perform_action: "light.turn_on" target: entity_id: "[[[ return entity.entity_id ]]]" + data: brightness_pct: "[[[ return variables.ulm_card_light_brightness_low ]]]" icon: "mdi:lightbulb-on-10" item2: @@ -387,6 +388,7 @@ card_light: perform_action: "light.turn_on" target: entity_id: "[[[ return entity.entity_id ]]]" + data: brightness_pct: "[[[ return variables.ulm_card_light_brightness_medium ]]]" icon: "mdi:lightbulb-on-50" item3: @@ -439,5 +441,6 @@ card_light: perform_action: "light.turn_on" target: entity_id: "[[[ return entity.entity_id ]]]" + data: brightness_pct: "[[[ return variables.ulm_card_light_brightness_high ]]]" icon: "mdi:lightbulb-on" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml index dafb2b4f4..4ea40f579 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml @@ -704,6 +704,7 @@ card_media_player: perform_action: "media_player.volume_mute" target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" + data: is_volume_muted: "[[[ return (states[entity.entity_id].attributes.is_volume_muted) ? false : true; ]]]" icon: "mdi:volume-mute" styles: @@ -765,6 +766,7 @@ card_media_player: perform_action: "media_player.volume_set" target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" + data: volume_level: | [[[ var volume = states[entity.entity_id].attributes.volume_level; @@ -845,6 +847,7 @@ card_media_player: perform_action: "media_player.volume_set" target: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" + data: volume_level: | [[[ var volume = states[entity.entity_id].attributes.volume_level; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml index 9c23e658c..16b015df6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml @@ -9,8 +9,9 @@ card_room: action: "perform-action" perform_action: "input_select.select_option" target: - option: "[[[ return variables.ulm_input_select_option ]]]" entity_id: "[[[ return variables.ulm_input_select ]]]" + data: + option: "[[[ return variables.ulm_input_select_option ]]]" color: "var(--google-grey-500)" size: "45%" aspect_ratio: "1/1" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml index 4ac8e9510..2e9742b31 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml @@ -225,6 +225,8 @@ card_thermostat: action: "perform-action" perform_action: "climate.set_temperature" target: + entity_id: "[[[ return entity.entity_id ]]]" + data: target_temp_low: | [[[ if (entity.attributes.target_temp_low == null) { @@ -256,7 +258,6 @@ card_thermostat: return (parseFloat(states[entity.entity_id].attributes.temperature) - step) } ]]] - entity_id: "[[[ return entity.entity_id ]]]" state: - operator: "template" value: > @@ -295,6 +296,8 @@ card_thermostat: action: "perform-action" perform_action: "climate.set_temperature" target: + entity_id: "[[[ return entity.entity_id ]]]" + data: target_temp_low: | [[[ if (entity.attributes.target_temp_low == null) { @@ -323,7 +326,6 @@ card_thermostat: return (parseFloat(states[entity.entity_id].attributes.temperature) + step) } ]]] - entity_id: "[[[ return entity.entity_id ]]]" state: - operator: "template" value: > @@ -351,6 +353,8 @@ card_thermostat: action: "perform-action" perform_action: "climate.set_temperature" target: + entity_id: "[[[ return entity.entity_id ]]]" + data: target_temp_low: | [[[ const unit = hass.config.unit_system.temperature @@ -358,7 +362,6 @@ card_thermostat: return (parseFloat(entity.attributes.target_temp_low) - step) ]]] target_temp_high: "[[[ return entity.attributes.target_temp_high ]]]" - entity_id: "[[[ return entity.entity_id ]]]" state: - operator: "template" value: > @@ -397,6 +400,8 @@ card_thermostat: action: "perform-action" perform_action: "climate.set_temperature" target: + entity_id: "[[[ return entity.entity_id ]]]" + data: target_temp_low: | [[[ const unit = hass.config.unit_system.temperature @@ -410,7 +415,6 @@ card_thermostat: const new_temp = (parseFloat(entity.attributes.target_temp_low) + step) return (new_temp + variables.ulm_card_thermostat_minimum_temp_spread > entity.attributes.target_temp_high ? new_temp + variables.ulm_card_thermostat_minimum_temp_spread : entity.attributes.target_temp_high) ]]] - entity_id: "[[[ return entity.entity_id ]]]" state: - operator: "template" value: > @@ -558,6 +562,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "auto" state: - operator: "template" @@ -588,6 +593,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "heat" state: - operator: "template" @@ -618,6 +624,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "cool" state: - operator: "template" @@ -648,6 +655,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "dry" state: - operator: "template" @@ -678,6 +686,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "heat_cool" state: - operator: "template" @@ -708,6 +717,7 @@ card_thermostat: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "fan_only" state: - operator: "template" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml index d1cec32e6..da11bf10d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/vertical_buttons/vertical_buttons_custom_state.yaml @@ -30,4 +30,5 @@ vertical_buttons_custom_state: perform_action: "input_select.select_option" target: entity_id: "[[[ return entity.entity_id ]]]" + data: option: "[[[ return variables.state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml index 75b194687..6d3474bc4 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_airconditionner.yaml @@ -20,4 +20,5 @@ popup_button_airconditionner: perform_action: "climate.set_hvac_mode" target: entity_id: "climate.hvac" + data: hvac_mode: "[[[ return variables.ulm_popup_button_airconditionner_state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml index e6f078827..e460cb97d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml @@ -21,4 +21,5 @@ popup_light_effect_row: perform_action: "light.turn_on" target: entity_id: "[[[ return entity.entity_id; ]]]" + data: effect: "[[[ return entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml index d613a1a26..8718c229f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml @@ -20,4 +20,5 @@ popup_light_palette_row: perform_action: "select.select_option" target: entity_id: "[[[ return entity.entity_id; ]]]" + data: option: "[[[ return entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml index 60da76cc5..27509cdb6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml @@ -20,4 +20,5 @@ popup_media_player_row: perform_action: "media_player.select_source" target: entity_id: "[[[ return entity.entity_id; ]]]" + data: source: "[[[ return entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml index f23788759..2373218af 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml @@ -283,6 +283,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "auto" styles: card: @@ -309,6 +310,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "heat" styles: card: @@ -335,6 +337,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "cool" styles: card: @@ -361,6 +364,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "dry" styles: card: @@ -387,6 +391,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "fan_only" styles: card: @@ -413,6 +418,7 @@ popup_thermostat_temperature: perform_action: "climate.set_hvac_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: hvac_mode: "heat_cool" styles: card: @@ -439,6 +445,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('none') ? 'none' : 'None'} ]]]" styles: card: @@ -466,6 +473,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('away') ? 'away' : 'Away'} ]]]" styles: card: @@ -493,6 +501,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('comfort') ? 'comfort' : 'Comfort'} ]]]" styles: card: @@ -520,6 +529,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('home') ? 'home' : 'Home'} ]]]" styles: card: @@ -547,6 +557,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('sleep') ? 'sleep' : 'Sleep'} ]]]" styles: card: @@ -574,6 +585,7 @@ popup_thermostat_temperature: perform_action: "climate.set_preset_mode" target: entity_id: "[[[ return entity.entity_id ]]]" + data: preset_mode: "[[[ if ('preset_mode' in entity.attributes) {return entity.attributes.preset_mode.includes('activity') ? 'activity' : 'Activity'} ]]]" styles: card: From 20db49a5bf753c2d34f08b8a368e36a64464084a Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 8 Dec 2024 13:43:25 +0000 Subject: [PATCH 21/37] Fix aiofiles version issue - update init.py --- .../ui_lovelace_minimalist/__init__.py | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/__init__.py b/custom_components/ui_lovelace_minimalist/__init__.py index e40cc9c3e..73b7e0c73 100644 --- a/custom_components/ui_lovelace_minimalist/__init__.py +++ b/custom_components/ui_lovelace_minimalist/__init__.py @@ -113,18 +113,7 @@ async def async_startup(): async def async_setup(hass: HomeAssistant, config: dict): """Set up this integration using UI.""" - if config.get(DOMAIN) is None: - # We get here if the integration is set up using config flow - return True - - hass.data.setdefault(DOMAIN_DATA, config[DOMAIN]) - hass.async_create_task( - hass.config_entries.flow.async_init( - DOMAIN, context={"source": SOURCE_IMPORT}, data=hass.data[DOMAIN_DATA] - ) - ) - # Return boolean to indicate that initialization was successful. - return True + return await async_initialize_integration(hass=hass, config=config) async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool: @@ -146,6 +135,13 @@ async def async_remove_entry(hass: HomeAssistant, config_entry: ConfigEntry): async_remove_panel(hass, "ui-lovelace-minimalist") +async def async_reload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> None: + """Reload Integration.""" + _LOGGER.debug("Reload the config entry") + + await async_setup_entry(hass, config_entry) + + async def config_entry_update_listener( hass: HomeAssistant, config_entry: ConfigEntry ) -> None: From 409859f292b6c3b1f079be843e2f521af4b289d7 Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 8 Dec 2024 13:59:17 +0000 Subject: [PATCH 22/37] Fix init.py --- custom_components/ui_lovelace_minimalist/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/__init__.py b/custom_components/ui_lovelace_minimalist/__init__.py index 73b7e0c73..be8369bbc 100644 --- a/custom_components/ui_lovelace_minimalist/__init__.py +++ b/custom_components/ui_lovelace_minimalist/__init__.py @@ -13,7 +13,7 @@ from homeassistant.loader import async_get_integration from .base import UlmBase -from .const import DOMAIN, DOMAIN_DATA, NAME +from .const import DOMAIN, NAME from .enums import ConfigurationType, UlmDisabledReason _LOGGER: logging.Logger = logging.getLogger(__package__) From 8a6d58ff1e2db4ae504aaded190546bc4081a229 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:13:44 +0100 Subject: [PATCH 23/37] Delete custom_cards/custom_card_bar_card/custom_card_bar_card.yaml --- .../custom_card_bar_card.yaml | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 custom_cards/custom_card_bar_card/custom_card_bar_card.yaml diff --git a/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml b/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml deleted file mode 100644 index 58dd0b13d..000000000 --- a/custom_cards/custom_card_bar_card/custom_card_bar_card.yaml +++ /dev/null @@ -1,70 +0,0 @@ ---- -custom_card_bar_card: - variables: - ulm_custom_card_bar_card_color: "var(--google-blue)" - ulm_custom_card_bar_card_min: "0" - ulm_custom_card_bar_card_max: "100" - triggers_update: "all" - styles: - grid: - - grid-template-areas: "'item1' 'item2'" - - grid-template-rows: "1fr" - card: - - border-radius: "var(--border-radius)" - - box-shadow: "var(--box-shadow)" - - padding: "0px" - custom_fields: - item1: - card: - type: "custom:button-card" - template: - - "icon_info" - - "card_generic" - variables: - ulm_card_generic_name: "[[[ return variables.ulm_custom_card_bar_card_name != '' ? variables.ulm_custom_card_bar_card_name : '' ]]]" - ulm_card_generic_icon: "[[[ return variables.ulm_custom_card_bar_card_icon != '' ? variables.ulm_custom_card_bar_card_icon : '' ]]]" - styles: - card: - - box-shadow: "none" - - border-radius: "var(--border-radius) var(--border-radius) 0px 0px" - - padding: "12px" - entity: "[[[ return variables.ulm_custom_card_bar_card_entity ]]]" - item2: - card: - type: "custom:bar-card" - entities: - - entity: "[[[ return variables.ulm_custom_card_bar_card_entity ]]]" - color: "[[[ return variables.ulm_custom_card_bar_card_color ]]]" - positions: - icon: "off" - indicator: "[[[ return variables.ulm_custom_card_bar_card_indicator == true ? 'inside' : 'off' ]]]" - minmax: "off" - title: "off" - value: "[[[ return variables.ulm_custom_card_bar_card_value == true ? 'inside' : 'off' ]]]" - name: "off" - min: "[[[ return variables.ulm_custom_card_bar_card_min ]]]" - max: "[[[ return variables.ulm_custom_card_bar_card_max ]]]" - card_mod: - style: |- - bar-card-currentbar { - border-radius: 0px !important; - right: 0; - } - bar-card-backgroundbar { - border-radius: 0px !important; - right: 0; - } - #states { - padding: 0; - height: 35px; - } - bar-card-background { - height: 35px !important; - } - bar-card-indicator { - left: 10px; - } - bar-card-value { - font-weight: bold; - font-size: 12px; - } From c986e8781937ad93c2fcf4636c9911f450abbb14 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:14:22 +0100 Subject: [PATCH 24/37] Delete custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml --- .../languages/hu.yaml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml diff --git a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml deleted file mode 100644 index 848b525aa..000000000 --- a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/hu.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -ulm_custom_card_eraycetinay_elapsed_time_language_variables: - variables: - custom_card_eraycetinay_elapsed_time_day: "nappal" - custom_card_eraycetinay_elapsed_time_days: "nappal" - custom_card_eraycetinay_elapsed_time_hour: "órával" - custom_card_eraycetinay_elapsed_time_hours: "órával" - custom_card_eraycetinay_elapsed_time_minute: "perccel" - custom_card_eraycetinay_elapsed_time_minutes: "perccel" - custom_card_eraycetinay_elapsed_time_ago: "ezelőtt" - custom_card_eraycetinay_elapsed_time_justnow: "éppen most" From 6afa0bfdd6a6b3cebb0506f643798d1f8d203c2b Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:15:31 +0100 Subject: [PATCH 25/37] Delete custom_cards/custom_card_eraycetinay_lock/README.md --- .../custom_card_eraycetinay_lock/README.md | 130 ------------------ 1 file changed, 130 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/README.md diff --git a/custom_cards/custom_card_eraycetinay_lock/README.md b/custom_cards/custom_card_eraycetinay_lock/README.md deleted file mode 100644 index 9b3bb9e06..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/README.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Lock Card Custom-card -hide: - - toc ---- - - - -# Custom-card "Lock" - -This is a `custom-card` that works in switch logic with a `lock` entity. Card structure uses `lock`, `unlock` (optional `open`) actions and `lock`,`unlock`,`locking`,`unlocking`, `jammed` states. - -![Generic](../../docs/assets/img/custom_card_eraycetinay_lock.png) - -## Credits - -Author: eraycetinay - 2022 -Version: 0.0.3 - -## Changelog - -
- 0.0.3 -
    -

    Contributor: Sisimomo - 2022-06-14

    -
  • Now can displays a warning when the battery is low.
  • -
  • Now can displays a warning when the door is lock but the door is still open.
  • -
  • Code refactoring to fit framework structure.
  • -
  • Documentation clean up.
  • -
  • Code clean up.
  • -
-
-
- 0.0.2 - Added option to only use lock.open -
-
- 0.0.1 - Initial release -
- -## Usage - -```yaml -- type: "custom:button-card" - entity: lock.door_lock - template: "custom_card_eraycetinay_lock" - name: "Door Lock" - variables: - ulm_custom_card_eraycetinay_lock_tap_control: true - ulm_custom_card_eraycetinay_lock_battery_level: sensor.door_battery - ulm_custom_card_eraycetinay_lock_door_open: binary_sensor.door_open - triggers_update: - - "sensor.door_battery" - - "binary_sensor.door_open" -``` - -## Variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VariableExampleDefaultRequiredExplanation
ulm_custom_card_eraycetinay_lock_tap_controltruefalsenoLock/Unlock on tap action
ulm_custom_card_eraycetinay_lock_only_opentruefalsenoOnly use the card to open the door (always sends lock.open on tap)
ulm_custom_card_eraycetinay_lock_battery_levelsensor.door_batterynoDisplays a warning when the battery is low.
ulm_custom_card_eraycetinay_lock_battery_warning2520noAt what battery percentage should the low battery warning appear.
ulm_custom_card_eraycetinay_lock_battery_warning_low105noAt what battery percentage should the very low battery warning appear.
ulm_custom_card_eraycetinay_lock_door_openbinary_sensor.door_opennoDisplays a warning when the door is lock but the door is still open.
ulm_custom_card_eraycetinay_lock_battery_sensor_binarytruefalsenoSet to true if using a binary battery sensor. Will ignore battery_warning percentage settings
ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_stateoffonnoSet whether the binary sensor turns to on or off when in low state
- -??? note "Template Code" - - ```yaml title="custom_card_eraycetinay_lock.yaml" - --8<-- "custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml" - ``` From d23728b3f6274d4d17e60d4cee6f92c65aee90ec Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:15:48 +0100 Subject: [PATCH 26/37] Delete custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml --- .../custom_card_eraycetinay_lock.yaml | 131 ------------------ 1 file changed, 131 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml b/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml deleted file mode 100644 index 8a20e4b99..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/custom_card_eraycetinay_lock.yaml +++ /dev/null @@ -1,131 +0,0 @@ ---- -custom_card_eraycetinay_lock: - template: - - "icon_info_bg" - - "ulm_translation_engine" - - "custom_card_eraycetinay_lock_language_variables" - variables: - ulm_custom_card_eraycetinay_lock_battery_warning: 20 - ulm_custom_card_eraycetinay_lock_battery_warning_low: 5 - ulm_custom_card_eraycetinay_lock_battery_sensor_binary: false - ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state: "on" - tap_action: - action: | - [[[ - return variables.ulm_custom_card_eraycetinay_lock_tap_control ? "call-service" : "more-info"; - ]]] - # only related with call-service action - service: | - [[[ - if(variables.ulm_custom_card_eraycetinay_lock_tap_control){ - if(variables.ulm_custom_card_eraycetinay_lock_open){ - return "lock.open"; - } else { - if (entity.state == "locked"){ - return "lock.unlock"; - } else if (entity.state == "unlocked"){ - return "lock.lock"; - } - } - } - ]]] - # only related with call-service action - service_data: - entity_id: | - [[[ return entity.entity_id; ]]] - show_label: true - show_name: true - triggers_update: - - "[[[ return entity.entity_id; ]]]" - label: "[[[ return variables.ulm_translation_state ]]]" - state: - - operator: "template" - value: | - [[[ return entity.state == ("unlocked" || "open" || "opened"); ]]] - styles: - icon: - - color: "rgba(var(--color-yellow),1)" - img_cell: - - background-color: "rgba(var(--color-yellow), 0.2)" - - operator: "template" - value: | - [[[ return entity.state == "locked" || "closed"; ]]] - styles: - icon: - - color: "rgba(var(--color-green),1)" - img_cell: - - background-color: "rgba(var(--color-green), 0.2)" - styles: - icon: - - color: "rgba(var(--color-theme),0.2)" - img_cell: - - background-color: "rgba(var(--color-theme),0.05)" - - border-radius: "50%" - - place-self: "center" - - width: "42px" - - height: "42px" - grid: - - position: "relative" - custom_fields: - notification_locked_and_opened: - - border-radius: "50%" - - position: "absolute" - - left: "28px" - - top: "-6px" - - height: "16px" - - width: "16px" - - border: "2px solid var(--card-background-color)" - - font-size: "12px" - - line-height: "14px" - - background-color: "[[[ return 'rgba(var(--color-red),1)'; ]]]" - notification_battery: - - border-radius: "50%" - - position: "absolute" - - left: "-6px" - - top: "-6px" - - height: "16px" - - width: "16px" - - border: "2px solid var(--card-background-color)" - - font-size: "12px" - - line-height: "14px" - - background-color: | - [[[ - if (variables.ulm_custom_card_eraycetinay_lock_battery_level !== undefined) { - if (variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary) { - if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state == variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state) { - return "rgba(var(--color-red),1)"; - } - } else { - if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning_low) { - return "rgba(var(--color-red),1)"; - } else if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state <= variables.ulm_custom_card_eraycetinay_lock_battery_warning) { - return "rgba(var(--color-yellow),1)"; - } - } - } - ]]] - custom_fields: - notification_locked_and_opened: > - [[[ - if (variables.ulm_custom_card_eraycetinay_lock_door_open !== undefined && (entity.state === "locked" && states[variables.ulm_custom_card_eraycetinay_lock_door_open].state === "on")) { - return ``; - } - ]]] - notification_battery: > - [[[ - if (variables.ulm_custom_card_eraycetinay_lock_battery_level !== undefined) { - if (variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary) { - if (states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state == variables.ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state) { - return ` - - `; - } - } else { - if (variables.ulm_custom_card_eraycetinay_lock_battery_warning >= states[variables.ulm_custom_card_eraycetinay_lock_battery_level].state) { - return ` - - `; - } - } - } - ]]] From cb38314a19c049caff9c62cd6858c6ef0c160779 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:16:11 +0100 Subject: [PATCH 27/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/de.yaml --- .../custom_card_eraycetinay_lock/languages/de.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete 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 deleted file mode 100644 index d97a28f11..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "verriegelt" - ulm_custom_card_eraycetinay_lock_unlocked: "entriegelt" - ulm_custom_card_eraycetinay_lock_locking: "verriegeln" - ulm_custom_card_eraycetinay_lock_unlocking: "entriegeln" - ulm_custom_card_eraycetinay_lock_unavailable: "nicht verfügbar" - ulm_custom_card_eraycetinay_lock_jammed: "blockiert" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "Die Tür ist verschlossen, aber noch offen." - ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterie ist an" - ulm_custom_card_eraycetinay_lock_battery_is_low: "Batterie schwach" From 8dd2760f162e4ca356a90e069e8d2a095c7d9770 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:16:46 +0100 Subject: [PATCH 28/37] Delete custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml --- .../custom_card_sisimomo_printer.yaml | 223 ------------------ 1 file changed, 223 deletions(-) delete mode 100644 custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml diff --git a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml b/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml deleted file mode 100644 index b80018dd8..000000000 --- a/custom_cards/custom_card_sisimomo_printer/custom_card_sisimomo_printer.yaml +++ /dev/null @@ -1,223 +0,0 @@ ---- -custom_card_sisimomo_printer: - template: - - "ulm_translation_engine" - - "ulm_language_variables" - variables: - printer_name: "[[[ entity.attributes.friendly_name; ]]]" - ulm_idle: "idle" - show_icon: false - show_label: false - show_name: false - triggers_update: "all" - tap_action: - action: "" - styles: - grid: - - grid-template-areas: "'printer_state' 'cartridges'" - - grid-template-columns: "1fr" - - grid-template-rows: "min-content" - card: - - border-radius: "var(--border-radius)" - - box-shadow: "var(--box-shadow)" - - padding: "12px" - - "--mdc-ripple-press-opacity": 0 - - cursor: "default" - custom_fields: - printer_state: - card: - type: "custom:button-card" - template: | - [[[ - return ( - entity.state.toLowerCase() != variables.ulm_idle.toLowerCase() - && entity.state.toLowerCase() != variables.ulm_translation_unavailable.toLowerCase() - ? [ "icon_info", "blue_no_state" ] : [ "icon_info" ] - ); - ]]] - tap_action: - action: "more-info" - label: "[[[ return entity.state; ]]]" - name: "[[[ return variables.printer_name; ]]]" - entity: "[[[ return entity.entity_id; ]]]" - styles: - card: - - padding: "0" - - "--mdc-ripple-press-opacity": 0.12 - - cursor: "pointer" - label: - - text-transform: "capitalize" - cartridges: | - [[[ - // Source: https://stackoverflow.com/a/56266358 - const isColor = (strColor) => { - const s = new Option().style; - s.color = strColor; - return s.color !== ''; - } - - let toner_info_available = true; - if (variables.cartridges !== undefined ? Array.isArray(variables.cartridges) && variables.cartridges.length > 0 : false) { - let errorArray = []; - variables.cartridges.forEach(cartridge => { - let index = variables.cartridges.indexOf(cartridge); - let valid_cartridge_types = ['unicolor', 'tricolor'] - - // Confirm that the label is provided. - if (cartridge.label === undefined) { - errorArray.push(`cartridges.[${index}].label: You must provide a value.`); - } - - // Confirm that a valid cartridge type is provided, if not default to 'unicolor' - // for backwards compatibility with older configuration files - if (cartridge.type === undefined) { - cartridge.type = 'unicolor' - } else if (!valid_cartridge_types.includes(cartridge.type)) { - errorArray.push(`cartridges.[${index}].type: You must provide a valid cartridge type`); - } - - // Confirm that the color is provided and is valid color css. - if (cartridge.color !== undefined) { - if (cartridge.type === 'unicolor') { - if (typeof cartridge.color === 'string' || cartridge.color instanceof String ? !isColor(cartridge.color) : false) { - errorArray.push(`cartridges.[${index}].color: You must provide a single valid CSS color value.`); - } - } else if (Array.isArray(cartridge.color) && cartridge.color.length === 3 ? cartridge.type === 'tricolor' : false) { - cartridge.color.forEach(color => { - let col_index = cartridge.color.indexOf(color); - if (!isColor(String(color))) { - errorArray.push(`cartridges.[${index}].color.[${col_index}]: You must provide a single valid CSS color value.`); - } - }); - } else { - errorArray.push(`cartridges.[${index}].color: Invalid combination of colour and type.`); - } - } else { - errorArray.push(`cartridges.[${index}].color: You must provide a value.`); - } - - // Confirm that the entity_id is provided, is a valid entity_id, a integer and a value between 0 and 100 inclusively. - if (cartridge.entity_id === undefined) { - errorArray.push(`cartridges.[${index}].entity_id: You must provide a value.`); - } else if (states[cartridge.entity_id] === undefined) { - errorArray.push(`cartridges.[${index}].entity_id: You must provide a existing entity_id.`); - } else if (String(states[cartridge.entity_id].state).toLowerCase() === String(variables.ulm_translation_unavailable).toLowerCase()) { - toner_info_available = false; - } else if (isNaN(states[cartridge.entity_id].state) || typeof states[cartridge.entity_id].state === "boolean") { - errorArray.push(`cartridges.[${index}].entity_id: You must provide a entity representing an integer.`); - } else if (states[cartridge.entity_id].state < 0 || states[cartridge.entity_id].state > 100) { - errorArray.push(`cartridges.[${index}].entity_id: You must provide a entity representing an integer between 0 and 100 inclusively.`); - } - }); - if (errorArray.length > 0) { - return `
- Configuration Error: -
    - ${errorArray.map(error => `
  • ${error}
  • `).join("")} -
-
`; - } - - if (toner_info_available) { - return '
' + - variables.cartridges.map(cartridge => { - if (cartridge.type === "unicolor") { - cartridge.bar_style = ` - background-color: ${cartridge.color}; - width: ${states[cartridge.entity_id].state}%; - `; - } else if (cartridge.type === "tricolor") { - cartridge.bar_style = ` - background: linear-gradient( - 180deg, - ${cartridge.color[0]}, - ${cartridge.color[0]} 33%, - ${cartridge.color[1]} 33%, - ${cartridge.color[1]} 66%, - ${cartridge.color[2]} 66%, - ${cartridge.color[2]} - ); - width: ${states[cartridge.entity_id].state}%; - `; - } - - // Removes unnecessary whitespace from inline CSS - cartridge.bar_style = cartridge.bar_style.replace(/\s{2,}/g, '') - return ` -
${cartridge.label}
-
-
-
-
${states[cartridge.entity_id].state}%
- `; - }).join("") + - '
'; - } else { - return ` -
- Toner Information Unavailable -
- `; - } - } else { - - } - ]]] - card_mod: - style: | - /* Cartridge CSS */ - div#cartridges .wrapper { - display: grid; - grid-template-columns: auto 1fr auto; - grid-gap: 1rem; - padding: 12px 8px 8px 8px; - } - div#cartridges .wrapper > *:nth-child(3n-2), .wrapper > *:nth-child(3n) { - place-self: center start; - } - div#cartridges .wrapper > .label { - filter: opacity(70%); - font-size: medium; - } - div#cartridges .wrapper > .container-bar { - position: relative; - border-radius: 4px; - border: 0.01rem solid rgba(var(--color-theme),.35); - } - div#cartridges .wrapper > .container-bar .bar { - height: 20px; - border-radius: 4px; - } - div#cartridges .wrapper > .state { - filter: opacity(40%); - font-size: medium; - } - - /* Error CSS */ - div#cartridges .error-container { - text-align: left; - font-size: 75%; - font-family: var(--code-font-family, monospace); - padding: 10px; - background-color: rgba(219, 68, 55, 0.75); - margin-top:10px; - border-radius:8px; - } - div#cartridges .error-container ul { - list-style: none; - padding: 0; - margin: 0; - overflow-wrap: break-word; - word-wrap: break-word; - white-space: normal !important; - } - div#cartridges .error-container ul li { - margin-top: 0.5em; - } - div#cartridges .info-unavailable { - padding: 1em; - white-space: normal; - margin-top:10px; - border-radius:8px; - opacity: 60%; - } From 162155096797ae960d60d425075c8cb902fed9cb Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:17:17 +0100 Subject: [PATCH 29/37] Delete custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml --- .../custom_card_paddy_dwd_pollen.yaml | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml diff --git a/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml b/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml deleted file mode 100644 index 1144adcec..000000000 --- a/custom_cards/custom_card_paddy_dwd_pollen/custom_card_paddy_dwd_pollen.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -custom_card_paddy_dwd_pollen: - template: - - "card_generic_swap" - - "custom_card_paddy_dwd_pollen_language_variables" - variables: - ulm_card_generic_swap_name: "[[[ return variables.ulm_custom_card_paddy_dwd_pollen_name; ]]]" - ulm_card_generic_swap_icon: "[[[ return variables.ulm_custom_card_paddy_dwd_pollen_icon; ]]]" - custom_fields: - item1: - card: - type: "custom:button-card" - template: - - "icon_more_info" - custom_fields: - item1: - card: - type: "custom:button-card" - entity: "[[[ return entity.entity_id ]]]" - state: - - value: "6" - styles: - img_cell: - - background-color: "rgba(190,0,33,1)" - - value: "5" - styles: - img_cell: - - background-color: "rgba(240,56,26,1)" - - value: "4" - styles: - img_cell: - - background-color: "rgba(254,154,36,1)" - - value: "3" - styles: - img_cell: - - background-color: "rgba(254,197,77,1)" - - value: "2" - styles: - img_cell: - - background-color: "rgba(254,228,156,1)" - - value: "1" - styles: - img_cell: - - background-color: "rgba(219,250,200,1)" - - value: "0" - styles: - icon: - - color: "rgba(var(--color-theme),0.2)" - item2: - card: - type: "custom:button-card" - entity: "[[[ return entity.entity_id ]]]" - label: > - [[[ - if (entity.state == "6"){ - return variables.custom_card_paddy_dwd_pollen_6; - } else if (entity.state == "5"){ - return variables.custom_card_paddy_dwd_pollen_5; - } else if (entity.state == "4"){ - return variables.custom_card_paddy_dwd_pollen_4; - } else if (entity.state == "3"){ - return variables.custom_card_paddy_dwd_pollen_3; - } else if (entity.state == "2"){ - return variables.custom_card_paddy_dwd_pollen_2; - } else if (entity.state == "1"){ - return variables.custom_card_paddy_dwd_pollen_1; - } - return variables.custom_card_paddy_dwd_pollen_none; - ]]] From c3db6010b51cc8b24c04804cecc9edc677b2c4a8 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:17:47 +0100 Subject: [PATCH 30/37] Delete custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml --- .../custom_card_mpse_printer.yaml | 224 ------------------ 1 file changed, 224 deletions(-) delete mode 100644 custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml diff --git a/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml b/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml deleted file mode 100644 index 56fad13d0..000000000 --- a/custom_cards/custom_card_mpse_printer/custom_card_mpse_printer.yaml +++ /dev/null @@ -1,224 +0,0 @@ ---- -custom_card_mpse_printer: - show_icon: false - show_name: false - show_label: false - styles: - card: - - border-radius: "20px" - - box-shadow: "var(--box-shadow)" - - padding: "0px" - grid: - - grid-template-areas: "'item1' 'item2' 'item3' 'item4' 'item5'" - - grid-template-columns: "1fr" - - grid-template-rows: "min-content" - custom_fields: - item1: - card: - entity: "[[[ return entity.entity_id ]]]" - name: "[[[ return variables.ulm_card_printer_name ]]]" - label: >- - [[[ - return entity.state; - ]]] - template: - - "icon_info" - - "custom_card_mpse_printer_blue" - styles: - card: - - padding: "12px" - type: "custom:button-card" - item2: - card: - type: "custom:bar-card" - height: "20px" - positions: - name: off - value: "inside" - icon: off - indicator: off - minmax: off - color: "black" - entities: - - entity: "[[[ return variables.ulm_card_printer_black_name ]]]" - card_mod: - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } - item3: - card: - type: "custom:bar-card" - height: "20px" - positions: - name: off - value: "inside" - icon: off - indicator: off - minmax: off - color: "rgb(250,255,0)" - entities: - - entity: "[[[ return variables.ulm_card_printer_yellow_name ]]]" - card_mod: - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } - item4: - card: - type: "custom:bar-card" - height: "20px" - positions: - name: off - value: "inside" - icon: off - indicator: off - minmax: off - color: "rgb(248,0,255)" - entities: - - entity: "[[[ return variables.ulm_card_printer_magenta_name ]]]" - card_mod: - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px; - } - item5: - card: - type: "custom:bar-card" - height: "20px" - positions: - name: off - value: "inside" - icon: off - indicator: off - minmax: off - color: "rgb(0,255,255)" - entities: - - entity: "[[[ return variables.ulm_card_printer_cyan_name ]]]" - card_mod: - style: | - bar-card-currentbar{ - border: 0.01rem solid rgba(var(--color-theme),.4); - } - bar-card-backgroundbar{ - display: none; - } - bar-card-name{ - width: 2rem; - margin-right: 40px !important; - } - bar-card-value{ - width: 2rem; - margin-left: 40px !important; - justify-content: center; - display: flex; - color: grey; - } - bar-card-background{ - margin: 4px 0 4px 0 !important; - text-align: initial; - } - ha-card{ - --bar-card-border-radius: 5px; - border-radius: 0px; - box-shadow: none; - } - #states{ - padding: 0 16px 16px 16px; - } -custom_card_mpse_printer_blue: - state: - - styles: - icon: - - color: "rgba(var(--color-blue),1)" - label: - - color: "rgba(var(--color-blue-text),1)" - name: - - color: "rgba(var(--color-blue-text),1)" - img_cell: - - background-color: "rgba(var(--color-blue), 0.2)" - card: - - background-color: "rgba(var(--color-background-blue), var(--opacity-bg))" - operator: "template" - value: > - [[[ - return entity.state!="idle" ? true : false - ]]] From adcf5485f224ffe04d7dea8e44536a95735aa0ff Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:18:06 +0100 Subject: [PATCH 31/37] Delete custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml --- .../custom_card_irmajavi_speedtest.yaml | 241 ------------------ 1 file changed, 241 deletions(-) delete mode 100644 custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml 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 deleted file mode 100644 index bc6df3597..000000000 --- a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml +++ /dev/null @@ -1,241 +0,0 @@ ---- -custom_card_irmajavi_speedtest: - triggers_update: "all" - show_name: false - show_label: false - template: - - "ulm_custom_card_irmajavi_speedtest_language_variables" - variables: - ulm_custom_card_irmajavi_speedtest_color: "blue" - ulm_custom_card_irmajavi_speedtest_router_name: "router_name" - ulm_custom_card_irmajavi_speedtest_router_model: "router_model" - styles: - grid: - - grid-template-areas: "'item1' 'item2' 'item3'" - - grid-template-columns: "1fr" - - grid-template-rows: "min-content min-content" - - row-gap: "12px" - card: - - border-radius: "var(--border-radius)" - - box-shadow: "var(--box-shadow)" - - padding: "12px" - custom_fields: - item1: - card: - type: "custom:button-card" - tap_action: - action: "none" - show_last_changed: false - show_label: true - show_name: true - show_icon: true - label: >- - [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_model ]]] - name: >- - [[[ return variables.ulm_custom_card_irmajavi_speedtest_router_name ]]] - icon: "mdi:wifi" - styles: - icon: - - color: >- - [[[ return - `rgba(var(--color-${variables.ulm_custom_card_irmajavi_speedtest_color}), - 1)`; ]]] - - width: "32px" - label: - - justify-self: "center" - - align-self: "start" - - font-weight: "bolder" - - font-size: "12px" - - filter: "opacity(40%)" - name: - - margin-top: "10px" - - justify-self: "center" - - font-weight: "bold" - - font-size: "14px" - img_cell: - - background-color: >- - [[[ return - `rgba(var(--color-${variables.ulm_custom_card_irmajavi_speedtest_color}), - 0.2)`; ]]] - - border-radius: "50%" - - place-self: "center" - - width: "62px" - - height: "62px" - grid: - - grid-template-areas: "'i' 'n' 'l'" - card: - - box-shadow: "none" - size: "20px" - item2: - card: - type: "custom:button-card" - tap_action: - action: "call-service" - service: "homeassistant.update_entity" - service_data: - entity_id: - - "[[[ return variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity]]]" - - "[[[ return variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity]]]" - - "[[[ return variables.ulm_custom_card_irmajavi_speedtest_ping_entity]]]" - color: "var(--google-grey)" - show_icon: true - show_label: false - show_name: true - styles: - custom_fields: - item1: - - justify-self: "end" - - margin-top: "-23px" - - margin-right: "3px" - icon: - - color: "rgba(var(--color-theme),0.9)" - - width: "20px" - img_cell: - - background-color: "none" - - place-self: "center" - - justify-self: "start" - - width: "40px" - - height: "20px" - name: - - align-self: "end" - - 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" - - grid-template-rows: "auto" - card: - - box-shadow: "none" - - border-radius: "10px" - - border: "2px solid var(--google-grey)" - - padding_bottom: "-8px" - - height: "40px" - - padding-top: "5px" - - padding-left: "5px" - name: "[[[ return variables.ulm_custom_card_irmajavi_speedtest_speedtest ]]]" - icon: "mdi:speedometer" - custom_fields: - item1: - card: - type: "custom:button-card" - show_icon: true - show_name: false - show_label: false - styles: - icon: - - color: "rgba(var(--color-theme),0.9)" - - width: "20px" - - justify-self: "end" - grid: - - grid-template-areas: "i" - - grid-template-columns: "auto" - - grid-template-rows: "auto" - card: - - box-shadow: "none" - icon: "mdi:chevron-right" - item3: - card: - type: "custom:button-card" - template: "list_2_items" - custom_fields: - item1: - card: - type: "custom:button-card" - color: "var(--google-blue)" - show_label: true - show_icon: false - name: "[[[ return variables.ulm_custom_card_irmajavi_speedtest_download ]]]" - entity: >- - [[[ return - variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity; - ]]] - label: | - [[[ - var state1 = ""; - if (states[variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity].state){ - var state1 = states[variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity].state; - if (states[variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity].attributes.unit_of_measurement){ - state1 += states[variables.ulm_custom_card_irmajavi_speedtest_download_speed_entity].attributes.unit_of_measurement; - } - } - return state1; - ]]] - styles: - icon: - - width: "30px" - - height: "30px" - label: - - align-self: "center" - - justify-self: "center" - - font-weight: "bold" - - font-size: "23px" - name: - - align-self: "center" - - justify-self: "center" - - font-weight: "bold" - - font-size: "12px" - - filter: "opacity(40%)" - grid: - - grid-template-areas: "'l' 'n'" - - grid-template-columns: "auto" - - grid-template-rows: "min-content" - card: - - box-shadow: "none" - - padding-top: "15px" - - padding-botton: "10px" - - background-color: "rgba(var(--color-theme),0.05)" - - border-radius: "14px" - - place-self: "center" - - height: "80px" - item2: - card: - type: "custom:button-card" - color: "var(--google-blue)" - show_label: true - show_icon: false - name: "[[[ return variables.ulm_custom_card_irmajavi_speedtest_upload ]]]" - entity: >- - [[[ return - variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity; - ]]] - label: | - [[[ - var state1 = ""; - if (states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].state){ - var state1 = states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].state; - if (states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement){ - state1 += states[variables.ulm_custom_card_irmajavi_speedtest_upload_speed_entity].attributes.unit_of_measurement; - } - } - return state1; - ]]] - styles: - icon: - - width: "30px" - - height: "30px" - label: - - align-self: "center" - - justify-self: "center" - - font-weight: "bold" - - font-size: "23px" - name: - - align-self: "center" - - justify-self: "center" - - font-weight: "bold" - - font-size: "12px" - - filter: "opacity(40%)" - grid: - - grid-template-areas: "'l' 'n'" - - grid-template-columns: "auto" - - grid-template-rows: "min-content" - card: - - box-shadow: "none" - - padding-top: "15px" - - padding-botton: "10px" - - background-color: "rgba(var(--color-theme),0.05)" - - border-radius: "14px" - - place-self: "center" - - height: "80px" From 16317e8137c7fd460dd3268df59a16003e150a7a Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:18:24 +0100 Subject: [PATCH 32/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml --- .../custom_card_eraycetinay_lock/languages/tr.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml deleted file mode 100644 index 71087a982..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/tr.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "kilitli" - ulm_custom_card_eraycetinay_lock_unlocked: "kilitli değil" - ulm_custom_card_eraycetinay_lock_locking: "kilitleniyor" - ulm_custom_card_eraycetinay_lock_unlocking: "kilit açılıyor" - ulm_custom_card_eraycetinay_lock_unavailable: "müsait değil" - ulm_custom_card_eraycetinay_lock_jammed: "sıkışmış" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "Kapı kilitli ama hala açık" - ulm_custom_card_eraycetinay_lock_battery_is_at: "pil" - ulm_custom_card_eraycetinay_lock_battery_is_low: "pil zayıf" From ab1ce0d770e403602a44e473bdafff420ed2bd47 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:18:51 +0100 Subject: [PATCH 33/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml --- .../custom_card_eraycetinay_lock/languages/sv.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml deleted file mode 100644 index 858d90629..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/sv.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "låst" - ulm_custom_card_eraycetinay_lock_unlocked: "olåst" - ulm_custom_card_eraycetinay_lock_locking: "låser" - ulm_custom_card_eraycetinay_lock_unlocking: "låser upp" - ulm_custom_card_eraycetinay_lock_unavailable: "otillgängligt" - ulm_custom_card_eraycetinay_lock_jammed: "fastnat" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "Dörren är låst men fortfarande öppen." - ulm_custom_card_eraycetinay_lock_battery_is_at: "Batterinivån är" - ulm_custom_card_eraycetinay_lock_battery_is_low: "Batteriet är lågt" From e1ba5721d876a885062f1174e90f5a6b2bb5d4d8 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:19:06 +0100 Subject: [PATCH 34/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml --- .../custom_card_eraycetinay_lock/languages/pl.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml deleted file mode 100644 index edfaba02f..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/pl.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "zamknięty" - ulm_custom_card_eraycetinay_lock_unlocked: "otwarty" - ulm_custom_card_eraycetinay_lock_locking: "zamykanie" - ulm_custom_card_eraycetinay_lock_unlocking: "otwieranie" - ulm_custom_card_eraycetinay_lock_unavailable: "niedostępny" - ulm_custom_card_eraycetinay_lock_jammed: "zacięty" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "Drzwi są zamknięte, ale nadal otwarte." - ulm_custom_card_eraycetinay_lock_battery_is_at: "Bateria jest na" - ulm_custom_card_eraycetinay_lock_battery_is_low: "Bateria jest słaba" From 8e56b169ad2ce2eb0422a033570106fee5dc8838 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:19:21 +0100 Subject: [PATCH 35/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/es.yaml --- .../custom_card_eraycetinay_lock/languages/es.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/es.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml deleted file mode 100644 index 3281e2ee1..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "bloqueado" - ulm_custom_card_eraycetinay_lock_unlocked: "desbloqueado" - ulm_custom_card_eraycetinay_lock_locking: "bloqueando" - ulm_custom_card_eraycetinay_lock_unlocking: "desbloqueando" - ulm_custom_card_eraycetinay_lock_unavailable: "no disponible" - ulm_custom_card_eraycetinay_lock_jammed: "apretada" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "La puerta está cerrada pero aún abierta." - ulm_custom_card_eraycetinay_lock_battery_is_at: "la batería está en" - ulm_custom_card_eraycetinay_lock_battery_is_low: "La batería está baja" From d7a63821c7e51e8b8af134c8d7514b800ae84923 Mon Sep 17 00:00:00 2001 From: Wilbert <155230953+wilbiev@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:19:32 +0100 Subject: [PATCH 36/37] Delete custom_cards/custom_card_eraycetinay_lock/languages/en.yaml --- .../custom_card_eraycetinay_lock/languages/en.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 custom_cards/custom_card_eraycetinay_lock/languages/en.yaml diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml deleted file mode 100644 index 81579b70b..000000000 --- a/custom_cards/custom_card_eraycetinay_lock/languages/en.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -custom_card_eraycetinay_lock_language_variables: - variables: - ulm_custom_card_eraycetinay_lock_locked: "locked" - ulm_custom_card_eraycetinay_lock_unlocked: "unlocked" - ulm_custom_card_eraycetinay_lock_locking: "locking" - ulm_custom_card_eraycetinay_lock_unlocking: "unlocking" - ulm_custom_card_eraycetinay_lock_unavailable: "unavailable" - ulm_custom_card_eraycetinay_lock_jammed: "jammed" - ulm_custom_card_eraycetinay_lock_locked_and_opened: "The door is locked but still open." - ulm_custom_card_eraycetinay_lock_battery_is_at: "Battery is at" - ulm_custom_card_eraycetinay_lock_battery_is_low: "Battery is low" From e0a036f2a44bdba042f470a08617d9cc889dc7ac Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 8 Dec 2024 14:35:50 +0000 Subject: [PATCH 37/37] Fix aiofiles HA 2024.12 --- custom_components/ui_lovelace_minimalist/manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/manifest.json b/custom_components/ui_lovelace_minimalist/manifest.json index 3a6b34c63..0aa0e891c 100644 --- a/custom_components/ui_lovelace_minimalist/manifest.json +++ b/custom_components/ui_lovelace_minimalist/manifest.json @@ -14,8 +14,8 @@ "iot_class": "calculated", "issue_tracker": "https://github.com/UI-Lovelace-Minimalist/UI/issues", "requirements": [ - "aiofiles==0.8.0", + "aiofiles>=0.8.0", "aiogithubapi>=22.2.4" ], - "version": "0.0.1" + "version": "v1.3.11" }