From 85eaf7eb7fac30d6de21e5da6dea8a6a31161ba1 Mon Sep 17 00:00:00 2001 From: wokkeltje13 <57153640+wokkeltje13@users.noreply.github.com> Date: Thu, 23 Jun 2022 20:50:17 +0200 Subject: [PATCH 01/33] Update en.yaml Add English translations for Custom-card "Afvalophaling" --- .../ui_lovelace_minimalist/lovelace/translations/en.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml index a588a6008..15965c1d3 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml @@ -4,6 +4,9 @@ ulm_language_variables: ulm_currency: "$" ulm_updates_available: "Updates available!" ulm_no_updates_available: "No updates available" + ulm_ophaling: "Garbage collection!" + ulm_geen_ophaling: "No collections" + ulm_volgende_ophaling: "Next collections" ulm_morning: "Good morning" ulm_afternoon: "Good afternoon" ulm_evening: "Good evening" From c611aca9829abb801fd03a4f49d519c19ad55148 Mon Sep 17 00:00:00 2001 From: schumijo Date: Fri, 24 Jun 2022 09:04:43 +0200 Subject: [PATCH 02/33] Custom name --- .../ulm_templates/card_templates/cards/card_battery.yaml | 8 +++----- docs/usage/cards/card_battery.md | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml index 9454efccb..b34431fc6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml @@ -6,6 +6,7 @@ card_battery: - "ulm_actions_card" - "ulm_translation_engine" variables: + ulm_card_battery_name: "[[[ return entity.attributes.friendly_name ]]]" ulm_card_battery_attribute: ulm_card_battery_battery_state_entity_id: ulm_card_battery_charger_type_entity_id: @@ -99,10 +100,11 @@ card_battery: item2: card: type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" variables: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" - entity: "[[[ return entity.entity_id ]]]" + name: "[[[ return variables.ulm_card_battery_name ]]]" label: | [[[ const battery_level = variables.ulm_card_battery_attribute !== null @@ -114,7 +116,3 @@ card_battery: else { return battery_level + "%"; } ]]] - name: | - [[[ - return states[entity.entity_id].attributes.friendly_name; - ]]] diff --git a/docs/usage/cards/card_battery.md b/docs/usage/cards/card_battery.md index 4b82a986a..cf25a0bcb 100644 --- a/docs/usage/cards/card_battery.md +++ b/docs/usage/cards/card_battery.md @@ -16,6 +16,7 @@ The `battery-card` is a slightly enhanced `generic-card`, that can indicate whet | Variable | Default | Required | Notes | |----------|---------|------------------|-------------------| | entity | | :material-check: | This is your battery entity | +| ulm_card_battery_name | `friendly_name` | :material-close: | Customize name | | ulm_card_battery_attribute | | :material-close: | If your entity provides the battery percent in an attribute (= not as an own sensor), fill in the attribute's name here. E.g. if you have `sensor.livingroom_thermometer` and the attribute for your battery power is `sensor.livingroom_thermometer.attributes.battery_percent`, you fill in battery_percent here. | | ulm_card_battery_battery_state_entity_id | | :material-close: | Entity that holds the battery state (charging/discharging). If provided, the Icon will display the current status. | | ulm_card_battery_charger_type_entity_id | | :material-close: | Entity that holds the charger type (ac/wireless/none). This Entity replaces the need for the `ulm_card_battery_battery_state_entity_id` entity. If provided, the Icon will display the current charger type. This is only useful if you charge your devices Wireless and with cable. | From be088e5e2f64dbe0ac3cd74b4a2d859f847eaade Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:23:24 +0200 Subject: [PATCH 03/33] Adapt binary sensor cards --- .../card_templates/cards/card_binary_sensor.yaml | 8 ++++++-- .../card_templates/cards/card_binary_sensor_alert.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml index 6819fbdc1..d3f5773a0 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml @@ -4,11 +4,13 @@ card_binary_sensor: template: - "icon_more_info_new" - "blue" - - "ulm_language_variables" + - "ulm_translation_engine" - "ulm_actions_card" show_last_changed: false variables: ulm_show_last_changed: false + ulm_card_binary_sensor_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_binary_sensor_name: "[[[ return entity.attributes.friendly_name ]]]" custom_fields: item1: card: @@ -26,6 +28,7 @@ card_binary_sensor: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" + con: "[[[ return variables.ulm_card_binary_sensor_icon; ]]]" item2: card: type: "custom:button-card" @@ -35,5 +38,6 @@ card_binary_sensor: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" - name: "[[[ return entity.attributes.friendly_name != '' ? entity.attributes.friendly_name : entity.entity_id ]]]" + name: "[[[ return variables.ulm_card_binary_sensor_name; ]]]" + label: "[[[ return variables.ulm_translation_state;]]]" show_last_changed: "[[[ return variables.ulm_show_last_changed; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml index 5a4750695..b1ff4f492 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml @@ -4,11 +4,13 @@ card_binary_sensor_alert: template: - "icon_more_info_alert" - "blue" - - "ulm_language_variables" + - "ulm_translation_engine" - "ulm_actions_card" show_last_changed: false variables: ulm_show_last_changed: false + ulm_card_binary_sensor_alert_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_binary_sensor_alert_name: "[[[ return entity.attributes.friendly_name ]]]" custom_fields: item1: card: @@ -26,6 +28,7 @@ card_binary_sensor_alert: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" + icon: "[[[ return variables.ulm_card_binary_sensor_alert_icon; ]]]" item2: card: type: "custom:button-card" @@ -35,5 +38,6 @@ card_binary_sensor_alert: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" - name: "[[[ return entity.attributes.friendly_name != '' ? entity.attributes.friendly_name : entity.entity_id ]]]" + name: "[[[ return variables.ulm_card_binary_sensor_alert_name; ]]]" + label: "[[[ return variables.ulm_translation_state;]]]" show_last_changed: "[[[ return variables.ulm_show_last_changed; ]]]" From e1a34e46921bf63bac5d79f4732ea2d767f01cf0 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:38:20 +0200 Subject: [PATCH 04/33] Card_generic and swap --- .../ulm_templates/card_templates/cards/card_generic.yaml | 6 +++++- .../card_templates/cards/card_generic_swap.yaml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml index 8337e3813..5c66826ae 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml @@ -5,6 +5,9 @@ card_generic: - "icon_more_info_new" - "ulm_actions_card" - "ulm_translation_engine" + variables: + ulm_card_generic_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_generic_name: "[[[ return entity.attributes.friendly_name ]]]" custom_fields: item1: card: @@ -19,6 +22,7 @@ card_generic: variables: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" + icon: "[[[ return variables.ulm_card_generic_icon; ]]]" styles: icon: - color: "rgba(var(--color-theme),0.9)" @@ -30,4 +34,4 @@ card_generic: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" name: "[[[ return variables.ulm_translation_state_unit ]]]" - label: "[[[ return entity.attributes.friendly_name; ]]]" + label: "[[[ return variables.ulm_card_generic_name ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml index a83b108f0..d58aa4c63 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml @@ -5,6 +5,9 @@ card_generic_swap: - "icon_more_info_new" - "ulm_actions_card" - "ulm_translation_engine" + variables: + ulm_card_generic_swap_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_generic_swap_name: "[[[ return entity.attributes.friendly_name ]]]" custom_fields: item1: card: @@ -19,6 +22,7 @@ card_generic_swap: variables: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" + icon: "[[[ return variables.ulm_card_generic_swap_icon; ]]]" styles: icon: - color: "rgba(var(--color-theme),0.9)" @@ -30,3 +34,4 @@ card_generic_swap: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" label: "[[[ return variables.ulm_translation_state_unit ]]]" + name: "[[[ return variables.ulm_card_generic_swap_name ]]]" From 3f09e0e9499f27036b6720c74a66bf2d1d5e3b09 Mon Sep 17 00:00:00 2001 From: schumijo Date: Fri, 24 Jun 2022 10:50:04 +0200 Subject: [PATCH 05/33] Fix typo --- .../ulm_templates/card_templates/cards/card_binary_sensor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml index d3f5773a0..5d3fcef41 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml @@ -28,7 +28,7 @@ card_binary_sensor: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" - con: "[[[ return variables.ulm_card_binary_sensor_icon; ]]]" + icon: "[[[ return variables.ulm_card_binary_sensor_icon; ]]]" item2: card: type: "custom:button-card" From 80b281655a7a46400877d22e4f8f31c0f9e15e5b Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:58:10 +0200 Subject: [PATCH 06/33] card power outlet --- .../ulm_templates/card_templates/cards/card_power_outlet.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml index f699464d2..749b6af49 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml @@ -8,6 +8,8 @@ card_power_outlet: - "ulm_actions_card" variables: ulm_card_power_outlet_consumption_sensor: + ulm_card_power_outlet_name: "[[[ return entity.attributes.friendly_name ]]]" + ulm_card_power_outlet_icon: "[[[ return entity.attributes.icon ]]]" triggers_update: "all" custom_fields: item1: @@ -26,6 +28,7 @@ card_power_outlet: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" + icon: "[[[ return variables.ulm_card_power_outlet_icon ]]]" item2: card: type: "custom:button-card" @@ -35,6 +38,7 @@ card_power_outlet: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" + name: "[[[ return variables.ulm_card_power_outlet_name ]]]" label: |- [[[ if (entity.state === "on" && variables.ulm_card_power_outlet_consumption_sensor !== null) { From 8858fd0733804da825244f13568a500273415dd6 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 24 Jun 2022 11:27:42 +0200 Subject: [PATCH 07/33] card graph --- .../2-line_cards/card_graph.yaml | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml index f3af7fb0a..96fecf981 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml @@ -3,13 +3,16 @@ card_graph: variables: ulm_card_graph_color: "var(--info-color)" - ulm_card_graph_name: "n/a" + ulm_card_graph_name: "[[[ return entity.attributes.friendly_name; ]]]" + ulm_card_graph_icon: "[[[ return entity.attributes.icon ]]]" ulm_card_graph_color2: "var(--info-color)" - ulm_card_graph_name2: "n/a" ulm_card_graph_entity2: "" ulm_card_graph_hours: 24 ulm_card_graph_type: "fill" ulm_card_graph_points: "0.5" + show_icon: false + show_name: false + show_label: false triggers_update: "all" styles: grid: @@ -25,15 +28,30 @@ card_graph: card: type: "custom:button-card" template: - - "icon_info" - "card_generic" styles: card: - box-shadow: "none" - border-radius: "var(--border-radius) var(--border-radius) 0px 0px" - padding: "12px" - entity: "[[[ return variables.ulm_card_graph_entity ]]]" - name: "[[[ return variables.ulm_card_graph_name ]]]" + entity: "[[[ return entity.entity_id ]]]" + 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 ]]]" + icon: "[[[ return variables.ulm_card_graph_icon; ]]]" + item2: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + label: "[[[ return variables.ulm_card_graph_name ]]]" item2: card: type: "custom:mini-graph-card" From 03484c0fbed242b33d3119de512a1f81d7e56226 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 24 Jun 2022 11:38:45 +0200 Subject: [PATCH 08/33] card input boolean --- .../card_templates/cards/card_input_boolean.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml index d097524ad..5bf07475c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml @@ -6,6 +6,9 @@ card_input_boolean: - "ulm_actions_card" - "ulm_translation_engine" - "blue" + variables: + ulm_card_input_boolean_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_input_boolean_name: "[[[ return entity.attributes.friendly_name ]]]" custom_fields: item1: card: @@ -23,6 +26,7 @@ card_input_boolean: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" + icon: "[[[ return variables.ulm_card_input_boolean_icon; ]]]" item2: card: type: "custom:button-card" @@ -32,5 +36,5 @@ card_input_boolean: ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]" ulm_input_select: "[[[ return variables.ulm_input_select; ]]]" entity: "[[[ return entity.entity_id ]]]" - name: "[[[ return entity.attributes.friendly_name != '' ? entity.attributes.friendly_name : entity.entity_id ]]]" + name: "[[[ return variables.ulm_card_input_boolean_name; ]]]" label: "[[[ return variables.ulm_translation_state ]]]" From 8315887c4b8828b5bb62dc6ce973293a90e2b506 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sat, 25 Jun 2022 16:26:03 +0200 Subject: [PATCH 09/33] Fix custom_card_damix48_power_details name --- .../custom_card_damix48_power_details.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml b/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml index f1698f672..36c38e4b9 100644 --- a/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml +++ b/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml @@ -24,6 +24,8 @@ custom_card_damix48_power_details: template: - "icon_info" - "card_generic" + variables: + ulm_card_generic_name: ""[[[ return variables.ulm_card_power_details_name ]]]" styles: card: - box-shadow: "none" @@ -38,7 +40,6 @@ custom_card_damix48_power_details: return variables.ulm_custom_card_damix48_power_details_in_the_lasts + " " + variables.ulm_card_power_details_hours + " " + variables.ulm_custom_card_damix48_power_details_hours; } ]]] - label: "[[[ return variables.ulm_card_power_details_name ]]]" item2: card: type: "custom:mini-graph-card" From 50bb29e467b4f639d4671f46793b31f8e8c78f8d Mon Sep 17 00:00:00 2001 From: schumijo Date: Sat, 25 Jun 2022 16:28:06 +0200 Subject: [PATCH 10/33] Revert icon_info_bg and icon_more_info --- .../card_templates/internal_templates/icon_info_bg.yaml | 7 ------- .../card_templates/internal_templates/icon_more_info.yaml | 6 ++++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_bg.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_bg.yaml index e02df1c1d..6af232e87 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_bg.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_bg.yaml @@ -1,7 +1,6 @@ --- ### Icon Info Bg ### icon_info_bg: - template: "ulm_custom_actions" color: "var(--google-grey)" show_icon: true show_label: true @@ -69,9 +68,3 @@ icon_info_bg: } ]]] size: "20px" - tap_action: - action: "[[[ return variables.ulm_card_tap_action ]]]" - hold_action: - action: "[[[ return variables.ulm_card_hold_action ]]]" - double_tap_action: - action: "[[[ return variables.ulm_card_double_tap_action ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info.yaml index 251427e0a..d1f0a391d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info.yaml @@ -12,6 +12,8 @@ icon_more_info: - column-gap: "0px" card: - background-color: "rgba(0,0,0,0)" + hold_action: + action: "more-info" custom_fields: item1: card: @@ -19,10 +21,11 @@ icon_more_info: entity: "[[[ return entity.entity_id ]]]" template: - "icon" - - "ulm_actions_icon" styles: card: - overflow: "visible" + tap_action: + action: "more-info" item2: card: type: "custom:button-card" @@ -30,7 +33,6 @@ icon_more_info: entity: "[[[ return entity.entity_id ]]]" template: - "icon_info" - - "ulm_actions_name" styles: card: - padding: "6px" From ea11a7b183f81c269c8ae2af81ce1b5a8890fbb5 Mon Sep 17 00:00:00 2001 From: schumijo <40740060+schumijo@users.noreply.github.com> Date: Sat, 25 Jun 2022 17:59:05 +0200 Subject: [PATCH 11/33] Fix typo --- .../custom_card_damix48_power_details.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml b/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml index 36c38e4b9..9bd5b15e3 100644 --- a/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml +++ b/custom_cards/custom_card_damix48_power_details/custom_card_damix48_power_details.yaml @@ -25,7 +25,7 @@ custom_card_damix48_power_details: - "icon_info" - "card_generic" variables: - ulm_card_generic_name: ""[[[ return variables.ulm_card_power_details_name ]]]" + ulm_card_generic_name: "[[[ return variables.ulm_card_power_details_name ]]]" styles: card: - box-shadow: "none" From 5999efad842f2ca0404304738c386c6ccb7e3333 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Sun, 26 Jun 2022 12:09:18 +0200 Subject: [PATCH 12/33] Rework engine --- .../lovelace/translations/default.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml index 163068054..a7dccffb2 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml @@ -41,8 +41,9 @@ ulm_translation_engine: if (def.includes(state)) { var mode = hass.resources[lang]["state.default." + state ]; } - var label = hass.resources[lang]["component." + domain + ".state._." + state] || state; - return (entity.attributes.current_temperature ) + '°' + ' • ' + label + (entity.state !='off' ? ' (' + mode + ')' : ''); + var label = hass.resources[lang]["component." + domain + ".state._." + state]; + var translation = label ? label : state; + return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + (entity.state !='off' ? ' (' + mode + ')' : ''); } ]]] ulm_translation_off: "[[[ return hass.resources[hass['language']]['state.default.off']; ]]]" @@ -55,14 +56,14 @@ ulm_translation_engine: let def = ["unknown", "unavailable"]; let lang = hass["language"]; let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); - var translation = hass.resources[lang]["component." + domain + ".state._." + state] || state; + var translation = hass.resources[lang]["component." + domain + ".state._." + state] if (def.includes(state)) { var translation = hass.resources[lang]["state.default." + state ]; } else if (domain == "binary_sensor" && d_class != ''){ - var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] || state; + var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] } - return translation; + return translation ? translation : state; } ]]] ulm_translation_state_reverse: > @@ -79,7 +80,7 @@ ulm_translation_engine: if (def.includes(state)) { var translation = hass.resources[lang]["state.default." + state ]; } - return translation; + return translation ? translation : state; } ]]] ulm_translation_state_unit: > @@ -101,16 +102,16 @@ ulm_translation_engine: var translation = hass.resources[lang]["state.default." + state ]; } else if (domain == "binary_sensor" && d_class != ''){ - var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] || state; + var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] } else if (domain == "media_player" && d_class != ''){ if (state == 'idle' || state == 'paused') - var translation = hass.resources[lang]["component." + domain + ".state." + state] || state; + var translation = hass.resources[lang]["component." + domain + ".state." + state]; else { var translation = (entity.attributes.source) + ' • ' + ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ; } } - return translation; + return translation ? translation : state; } ]]] ulm_translation_statistics: "[[[ return hass.resources[hass['language']]['ui.components.statistic-picker.statistic']; ]]]" From de6e6616754478d446d9a8aaa804b0c0caf26884 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Sun, 26 Jun 2022 12:49:33 +0200 Subject: [PATCH 13/33] Update color translation --- .../ui_lovelace_minimalist/lovelace/translations/cn.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/cs.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/da.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/de.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/en.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/es.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/fi.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/fr.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/it.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/nl.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/no.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/pl.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/pt.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/ru.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/sk.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/sv.yaml | 1 + .../ui_lovelace_minimalist/lovelace/translations/tr.yaml | 1 + 18 files changed, 18 insertions(+) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml index e83a279d5..2475fbacf 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "晚上好" ulm_hello: "你好" ulm_volume: "体积" + ulm_popups_color: "顏色" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml index 583bf7ff8..79e777838 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Dobrý večer" ulm_hello: "Ahoj" ulm_volume: "Hlasitost" + ulm_popups_color: "Barva" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml index ec8e04615..8fb0d08e6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Good evening" ulm_hello: "Hello" ulm_volume: "Volumen" + ulm_popups_color: "Farve" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml index dfb2d8404..9f7317d67 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Guten Abend" ulm_hello: "Hallo" ulm_volume: "Lautstärke" + ulm_popups_color: "Farbe" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml index a588a6008..23aba2c77 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Good evening" ulm_hello: "Hello" ulm_volume: "Volume" + ulm_popups_color: "Color" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml index ceaa85ba8..0bc2062ad 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Buenas noches" ulm_hello: "Hola" ulm_volume: "Volumen" + ulm_popups_color: "Color" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml index 856d5f2bf..7a06561fa 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Hyvää iltaa" ulm_hello: "Hei" ulm_volume: "Äänenvoimakkuus" + ulm_popups_color: "Väri" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml index 8678c6792..482267b00 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Bonsoir" ulm_hello: "Bonjour" ulm_volume: "Volume" + ulm_popups_color: "Couleur" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml index 5be6a45ca..1019eedf8 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Buonasera" ulm_hello: "Ciao" ulm_volume: "Volume" + ulm_popups_color: "Colore" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml index 6ae26facf..00ea82687 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml @@ -12,3 +12,4 @@ ulm_language_variables: ulm_evening: "Goedenavond" ulm_hello: "Hallo" ulm_volume: "Volume" + ulm_popups_color: "Kleur" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml index cb1ce0fc0..d2c9d27f9 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "God kveld" ulm_hello: "Hei" ulm_volume: "Volume" + ulm_popups_color: "Farge" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml index 88754ed89..079e0a85c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Dobry wieczór" ulm_hello: "Witaj" ulm_volume: "Objętość" + ulm_popups_color: "Kolor" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml index ce8aa2efd..15a0ce73b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Boa noite" ulm_hello: "Olá" ulm_volume: "Volume" + ulm_popups_color: "Cor" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml index 08adbbdaa..220c309d0 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Boa noite" ulm_hello: "Olá" ulm_volume: "Volume" + ulm_popups_color: "Cor" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml index 0bcaad6fe..ceb1f12a6 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Добрый вечер" ulm_hello: "Здравствуйте" ulm_volume: "Объем" + ulm_popups_color: "Цвет" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml index 2f47186fc..c47bcc031 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "Dobrý večer" ulm_hello: "Ahoj" ulm_volume: "Volume" + ulm_popups_color: "Farba" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml index 064a35e35..b0b865550 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "God kväll" ulm_hello: "Hej" ulm_volume: "Volym" + ulm_popups_color: "Färg" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml index ae0ce41b9..5d0fa3011 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml @@ -9,3 +9,4 @@ ulm_language_variables: ulm_evening: "İyi akşamlar" ulm_hello: "Hello" ulm_volume: "Cilt" + ulm_popups_color: "Renk" From 6af9ad6069064e6114096923993989f7c1370179 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 14:56:34 +0200 Subject: [PATCH 14/33] Update README custom_card_damix48_power_details --- custom_cards/custom_card_damix48_power_details/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_cards/custom_card_damix48_power_details/README.md b/custom_cards/custom_card_damix48_power_details/README.md index 5bd00e691..46604644d 100644 --- a/custom_cards/custom_card_damix48_power_details/README.md +++ b/custom_cards/custom_card_damix48_power_details/README.md @@ -15,7 +15,7 @@ The `custom_card_damix48_power_details` is an extension of the standard graph ca ## Credits Author: Damix48 -Version: 0.1.0 +Version: 0.1.1 ## Changelog @@ -23,6 +23,10 @@ Version: 0.1.0 0.1.0 Initial release. +
+0.1.1 +Fix for UI Minimalist v1.0.1. +
## Usage From ca0f5dab4e0010f09e318474b390c6b04a3eb8c3 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:00:53 +0200 Subject: [PATCH 15/33] Fix custom_card_bar_card name --- custom_cards/custom_card_bar_card/README.md | 4 ++++ custom_cards/custom_card_bar_card/custom_card_bar_card.yaml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_cards/custom_card_bar_card/README.md b/custom_cards/custom_card_bar_card/README.md index b8833821b..950af5eef 100644 --- a/custom_cards/custom_card_bar_card/README.md +++ b/custom_cards/custom_card_bar_card/README.md @@ -23,6 +23,10 @@ Version: 1.0.0 1.0.0 Initial release. +
+0.1.1 +Fix for UI Minimalist v1.0.1. +
## Requirements 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 220f80377..1fa85789e 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 @@ -20,13 +20,14 @@ custom_card_bar_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 : '' ]]]" 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 ]]]" - name: "[[[ return variables.ulm_custom_card_bar_card_name != '' ? variables.ulm_custom_card_bar_card_name : '' ]]]" item2: card: type: "custom:bar-card" From 9c3a3cbdd4ed6f8cb085698e62d1f2f907fe3ed5 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:11:16 +0200 Subject: [PATCH 16/33] Fix custom_card_nik_nas name --- custom_cards/custom_card_nik_nas/README.md | 3 ++ .../custom_card_nik_nas.yaml | 30 +++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/custom_cards/custom_card_nik_nas/README.md b/custom_cards/custom_card_nik_nas/README.md index 173e29157..66e521bfc 100644 --- a/custom_cards/custom_card_nik_nas/README.md +++ b/custom_cards/custom_card_nik_nas/README.md @@ -24,6 +24,9 @@ Version: 1.0.0 1.0.0 Initial release +0.1.1 +Fix for UI Minimalist v1.0.1. + ## Requirements diff --git a/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml b/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml index a9f0605f9..fb2c3f4d1 100644 --- a/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml +++ b/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml @@ -145,9 +145,10 @@ custom_card_nik_nas: card: type: "custom:button-card" entity: "[[[ return variables.entity_1.entity_id ]]]" - icon: "[[[ return variables.entity_1.icon ]]]" - name: "[[[ return variables.entity_1.name ]]]" template: "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_1.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_1.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" @@ -162,9 +163,10 @@ custom_card_nik_nas: card: type: "custom:button-card" entity: "[[[ return variables.entity_2.entity_id ]]]" - icon: "[[[ return variables.entity_2.icon ]]]" - name: "[[[ return variables.entity_2.name ]]]" template: "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_2.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_2.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" @@ -179,9 +181,10 @@ custom_card_nik_nas: card: type: "custom:button-card" entity: "[[[ return variables.entity_3.entity_id ]]]" - icon: "[[[ return variables.entity_3.icon ]]]" - name: "[[[ return variables.entity_3.name ]]]" template: "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_3.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_3.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" @@ -199,8 +202,9 @@ custom_card_nik_nas: - type: "custom:button-card" template: "card_input_boolean" entity: "[[[ return entity.entity_id]]]" - icon: "mdi:nas" - name: "[[[ return variables.ulm_translation_status ]]]" + variables: + ulm_card_input_boolean_name: "[[[ return variables.ulm_translation_status ]]]" + ulm_card_input_boolean_icon: "mdi:nas" styles: card: - background-color: "transparent" @@ -212,8 +216,9 @@ custom_card_nik_nas: - type: "custom:button-card" template: "card_generic_swap" entity: "[[[ return variables.entity_4.entity_id ]]]" - icon: "[[[ return variables.entity_4.icon ]]]" - name: "[[[ return variables.entity_4.name ]]]" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_4.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_4.icon ]]]" styles: card: - background-color: "transparent" @@ -230,8 +235,9 @@ custom_card_nik_nas: type: "custom:button-card" template: "card_input_boolean" entity: "[[[ return entity.entity_id]]]" - icon: "mdi:nas" - name: "[[[ return variables.ulm_translation_status ]]]" + variables: + ulm_card_input_boolean_name: "[[[ return variables.ulm_translation_status ]]]" + ulm_card_input_boolean_icon: "mdi:nas" styles: card: - background-color: "transparent" From 49723261d5e83fa758759a0209ad142b1e28ba8a Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:16:36 +0200 Subject: [PATCH 17/33] Fix custom_card_nik_tablet name --- custom_cards/custom_card_nik_tablet/README.md | 4 ++++ .../custom_card_nik_tablet/custom_card_nik_tablet.yaml | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/custom_cards/custom_card_nik_tablet/README.md b/custom_cards/custom_card_nik_tablet/README.md index 4244a844b..f9d2817c1 100644 --- a/custom_cards/custom_card_nik_tablet/README.md +++ b/custom_cards/custom_card_nik_tablet/README.md @@ -23,6 +23,10 @@ Version: 1.0.0 1.0.0 Initial release +
+0.1.1 +Fix for UI Minimalist v1.0.1. +
## Requirements diff --git a/custom_cards/custom_card_nik_tablet/custom_card_nik_tablet.yaml b/custom_cards/custom_card_nik_tablet/custom_card_nik_tablet.yaml index 7e466cd65..aa8398ca8 100644 --- a/custom_cards/custom_card_nik_tablet/custom_card_nik_tablet.yaml +++ b/custom_cards/custom_card_nik_tablet/custom_card_nik_tablet.yaml @@ -49,8 +49,9 @@ custom_card_nik_tablet: type: "custom:button-card" template: "card_input_boolean" entity: "[[[ return variables.ulm_custom_card_nik_tablet_main ]]]" - icon: "mdi:tablet" - name: "[[[ return variables.ulm_custom_card_nik_tablet_name ]]]" + variables: + ulm_card_input_boolean_name: "[[[ return variables.ulm_custom_card_nik_tablet_name ]]]" + ulm_card_input_boolean_icon: "mdi:tablet" styles: card: - box-shadow: "none" @@ -203,16 +204,17 @@ custom_bar_card_nik_tablet: item1: card: type: "custom:button-card" + entity: "[[[ return variables.ulm_custom_bar_card_nik_tablet_card_entity ]]]" template: - "icon_info" - "card_generic" + variables: + ulm_card_generic_name: "[[[ return variables.ulm_custom_bar_card_nik_tablet_card_name != '' ? variables.ulm_custom_bar_card_nik_tablet_card_name : '' ]]]" styles: card: - box-shadow: "none" - border-radius: "none" - padding: "12px" - entity: "[[[ return variables.ulm_custom_bar_card_nik_tablet_card_entity ]]]" - name: "[[[ return variables.ulm_custom_bar_card_nik_tablet_card_name != '' ? variables.ulm_custom_bar_card_nik_tablet_card_name : '' ]]]" item2: card: type: "custom:bar-card" From c279719a2e29e6cb4de35e2773efc99adab94c70 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:37:15 +0200 Subject: [PATCH 18/33] Fix custom_card_apexcharts name --- custom_cards/custom_card_apexcharts/README.md | 4 ++++ .../custom_card_apexcharts/apexcharts.yaml | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/custom_cards/custom_card_apexcharts/README.md b/custom_cards/custom_card_apexcharts/README.md index e33a5197a..ce171db24 100644 --- a/custom_cards/custom_card_apexcharts/README.md +++ b/custom_cards/custom_card_apexcharts/README.md @@ -24,6 +24,10 @@ hide: 1.0.0 Initial release +
+1.0.1 +Fix for UI Minimalist v1.0.1. +
## Usage diff --git a/custom_cards/custom_card_apexcharts/apexcharts.yaml b/custom_cards/custom_card_apexcharts/apexcharts.yaml index f4f27fbc2..6c2d7420b 100644 --- a/custom_cards/custom_card_apexcharts/apexcharts.yaml +++ b/custom_cards/custom_card_apexcharts/apexcharts.yaml @@ -57,10 +57,11 @@ custom_card_apexcharts: card: type: "custom:button-card" entity: "[[[ return variables.entity_1.entity_id ]]]" - icon: "[[[ return variables.entity_1.icon ]]]" - name: "[[[ return variables.entity_1.name ]]]" template: - "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_1.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_1.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" @@ -75,10 +76,11 @@ custom_card_apexcharts: card: type: "custom:button-card" entity: "[[[ return variables.entity_2.entity_id ]]]" - icon: "[[[ return variables.entity_2.icon ]]]" - name: "[[[ return variables.entity_2.name ]]]" template: - "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_2.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_2.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" @@ -93,10 +95,11 @@ custom_card_apexcharts: card: type: "custom:button-card" entity: "[[[ return variables.entity_3.entity_id ]]]" - icon: "[[[ return variables.entity_3.icon ]]]" - name: "[[[ return variables.entity_3.name ]]]" template: - "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.entity_3.name ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.entity_3.icon ]]]" styles: icon: - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" From 2e51c2e298c66118798d2023791f9dd6dccf5982 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:54:52 +0200 Subject: [PATCH 19/33] Fix color icon custom_card_nik_nas --- .../custom_card_nik_nas.yaml | 68 ++++++++++++++----- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml b/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml index fb2c3f4d1..c89152cbf 100644 --- a/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml +++ b/custom_cards/custom_card_nik_nas/custom_card_nik_nas.yaml @@ -149,11 +149,20 @@ custom_card_nik_nas: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_1.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_1.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" @@ -167,11 +176,20 @@ custom_card_nik_nas: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_2.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_2.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" @@ -185,11 +203,20 @@ custom_card_nik_nas: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_3.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_3.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" @@ -219,15 +246,24 @@ custom_card_nik_nas: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_4.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_4.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_4.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_4.color}), 0.20)`;]]]" styles: card: - background-color: "transparent" - box-shadow: "none" - border: "2px solid var(--google-grey)" - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_4.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_4.color}), 0.20)`;]]]" tap_action: action: "none" item5: From e4777938952ec5ad8f1ea24a7d1b6e6d1ec2ab72 Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 15:59:42 +0200 Subject: [PATCH 20/33] Fix apexcharts icon color --- .../custom_card_apexcharts/apexcharts.yaml | 51 ++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/custom_cards/custom_card_apexcharts/apexcharts.yaml b/custom_cards/custom_card_apexcharts/apexcharts.yaml index 6c2d7420b..1fc9f0b4d 100644 --- a/custom_cards/custom_card_apexcharts/apexcharts.yaml +++ b/custom_cards/custom_card_apexcharts/apexcharts.yaml @@ -62,11 +62,20 @@ custom_card_apexcharts: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_1.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_1.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_1.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" @@ -81,11 +90,20 @@ custom_card_apexcharts: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_2.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_2.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_2.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" @@ -100,11 +118,20 @@ custom_card_apexcharts: variables: ulm_card_generic_swap_name: "[[[ return variables.entity_3.name ]]]" ulm_card_generic_swap_icon: "[[[ return variables.entity_3.icon ]]]" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 0.20)`;]]]" styles: - icon: - - color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 1)`;]]]" - img_cell: - - background-color: "[[[ return `rgba(var(--color-${variables.entity_3.color}), 0.20)`;]]]" card: - box-shadow: "none" - border-radius: "none" From b6442176dfe308d925d58dc861b3af769077fb9b Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 16:06:26 +0200 Subject: [PATCH 21/33] Fix custom_card_vncntdev_device_tracer name and icon color --- .../README.md | 5 ++ .../vncntdev_card_device_tracer.yaml | 73 +++++++++++-------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/custom_cards/custom_card_vncntdev_device_tracer/README.md b/custom_cards/custom_card_vncntdev_device_tracer/README.md index 35a49741b..c49c70f9c 100644 --- a/custom_cards/custom_card_vncntdev_device_tracer/README.md +++ b/custom_cards/custom_card_vncntdev_device_tracer/README.md @@ -21,6 +21,11 @@ Version: 1.0.0 ## Changelog +
+1.1.1 +Fix for UI Minimalist v1.0.1. +
+
1.1.0 Support WoL diff --git a/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml b/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml index 8666b0f98..66a67706b 100644 --- a/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml +++ b/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml @@ -7,34 +7,45 @@ custom_card_vncntdev_device_tracker: custom_card_vncntdev_device_tracker_icon: "mdi:server" custom_card_vncntdev_device_tracker_color_online: "var(--google-green)" custom_card_vncntdev_device_tracker_color_offline: "var(--google-red)" - tap_action: - action: "more-info" - icon: "[[[return variables.custom_card_vncntdev_device_tracker_icon]]]" - label: | - [[[ - if (variables.custom_card_vncntdev_device_tracker_status_as_name) { - return variables.custom_card_vncntdev_device_tracker_name !== null? - variables.custom_card_vncntdev_device_tracker_name: - entity.attributes.friendly_name; - } else { - return (entity.state == "not_home" || entity.state == "off") ? "Offline" : "Online"; - } - ]]] - name: | - [[[ - if (!variables.custom_card_vncntdev_device_tracker_status_as_name) { - return variables.custom_card_vncntdev_device_tracker_name !== null? - variables.custom_card_vncntdev_device_tracker_name: - entity.attributes.friendly_name; - } else { - return (entity.state == "not_home" || entity.state == "off") ? "Offline" : "Online"; - } - ]]] - styles: - icon: - - color: > - [[[ - return (entity.state == "not_home" || entity.state == "off") ? - variables.custom_card_vncntdev_device_tracker_color_offline: - variables.custom_card_vncntdev_device_tracker_color_online; - ]]] + custom_fields: + item1: + card: + type: "custom:button-card" + template: + - "icon_more_info" + custom_fields: + item1: + card: + type: "custom:button-card" + icon: "[[[return variables.custom_card_vncntdev_device_tracker_icon]]]" + styles: + icon: + - color: > + [[[ + return (entity.state == "not_home" || entity.state == "off") ? + variables.custom_card_vncntdev_device_tracker_color_offline: + variables.custom_card_vncntdev_device_tracker_color_online; + ]]] + item2: + card: + type: "custom:button-card" + name: | + [[[ + if (!variables.custom_card_vncntdev_device_tracker_status_as_name) { + return variables.custom_card_vncntdev_device_tracker_name !== null? + variables.custom_card_vncntdev_device_tracker_name: + entity.attributes.friendly_name; + } else { + return (entity.state == "not_home" || entity.state == "off") ? "Offline" : "Online"; + } + ]]] + label: | + [[[ + if (variables.custom_card_vncntdev_device_tracker_status_as_name) { + return variables.custom_card_vncntdev_device_tracker_name !== null? + variables.custom_card_vncntdev_device_tracker_name: + entity.attributes.friendly_name; + } else { + return (entity.state == "not_home" || entity.state == "off") ? "Offline" : "Online"; + } + ]]] \ No newline at end of file From 91d8e50f8f0d8254fcc03b2aaabdbefca33216fb Mon Sep 17 00:00:00 2001 From: schumijo Date: Sun, 26 Jun 2022 16:07:41 +0200 Subject: [PATCH 22/33] Fix quality vncntdev_card_device_tracer --- .../vncntdev_card_device_tracer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml b/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml index 66a67706b..2b921381c 100644 --- a/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml +++ b/custom_cards/custom_card_vncntdev_device_tracer/vncntdev_card_device_tracer.yaml @@ -48,4 +48,4 @@ custom_card_vncntdev_device_tracker: } else { return (entity.state == "not_home" || entity.state == "off") ? "Offline" : "Online"; } - ]]] \ No newline at end of file + ]]] From 323a884c46769ef93d2bb875cd01d98188dc8375 Mon Sep 17 00:00:00 2001 From: Joe Neuman Date: Sun, 26 Jun 2022 14:32:49 -0700 Subject: [PATCH 23/33] Introduce minimum spread variable for thermostat card Some thermostats don't like when the low and high temperature at set to the same value. The minimum spread will ensure there is always that amount of difference between the `target_temp_low` & `target_temp_high`. It is also able to be set by a user if they'd prefer a higher spread (or a spread of 0). --- .../ulm_templates/card_templates/cards/card_thermostat.yaml | 5 +++-- docs/usage/cards/card_thermostat.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 65ae35d0e..3ba759dda 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 @@ -16,6 +16,7 @@ card_thermostat: ulm_card_thermostat_enable_horizontal: false ulm_card_thermostat_enable_popup: false ulm_card_thermostat_fan_entity: null + ulm_card_thermostat_minimum_temp_spread: 1 show_icon: false show_name: false show_label: false @@ -218,7 +219,7 @@ card_thermostat: const unit = hass.config.unit_system.temperature const step = entity.attributes.target_temp_step || (unit == '°F' ? 1.0 : 0.5) const new_temp = (parseFloat(entity.attributes.target_temp_high) - step) - return (new_temp < entity.attributes.target_temp_low ? new_temp : entity.attributes.target_temp_low); + return (new_temp - variables.ulm_card_thermostat_minimum_temp_spread < entity.attributes.target_temp_low ? new_temp - variables.ulm_card_thermostat_minimum_temp_spread : entity.attributes.target_temp_low); } ]]] target_temp_high: | @@ -393,7 +394,7 @@ card_thermostat: const unit = hass.config.unit_system.temperature const step = entity.attributes.target_temp_step || (unit == '°F' ? 1.0 : 0.5) const new_temp = (parseFloat(entity.attributes.target_temp_low) + step) - return (new_temp > entity.attributes.target_temp_high ? new_temp : entity.attributes.target_temp_high) + 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: diff --git a/docs/usage/cards/card_thermostat.md b/docs/usage/cards/card_thermostat.md index 5bf8564bb..956687693 100644 --- a/docs/usage/cards/card_thermostat.md +++ b/docs/usage/cards/card_thermostat.md @@ -42,7 +42,8 @@ This card merges the following one : | ulm_card_thermostat_enable_display_temperature | `false` | :material-close: | Display current temperature on top right | | | ulm_card_thermostat_enable_horizontal | `false` | :material-close: | Enable horizontal card| Need `ulm_card_thermostat_enable_controls: true` | | ulm_card_thermostat_enable_popup | `false` | :material-close: | Enable `popup_thermostat` | | -| ulm_card_thermostat_fan_entity | `null` | :material-close: | `fan` entity for climate if seperate entity | | +| ulm_card_thermostat_fan_entity | `null` | :material-close: | `fan` entity for climate if seperate entity | | +| ulm_card_thermostat_minimum_temp_spread | `1` | :material-close: | Minimum temperature spread between low and high temperature when in `heat_cool` mode | | ## Usage From 28a978f2550f3dac7ec49f231f140578e8232e36 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Mon, 27 Jun 2022 09:04:05 +0200 Subject: [PATCH 24/33] Fix custom_card_paddy_dwd_pollen --- .../custom_card_paddy_dwd_pollen.yaml | 110 ++++++++++-------- 1 file changed, 64 insertions(+), 46 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 54b573f16..863f5a399 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 @@ -3,49 +3,67 @@ custom_card_paddy_dwd_pollen: template: - "card_generic_swap" - "custom_card_paddy_dwd_pollen_language_variables" - 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: - 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)" + variables: + ulm_card_generic_icon: "[[[ return entity.attributes.icon ]]]" + ulm_card_generic_name: "[[[ return entity.attributes.friendly_name ]]]" + 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 ]]]" + 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: + 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)" From 8b1e73bfd02c00b5029e059d2a4191c1cb89b14a Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Mon, 27 Jun 2022 09:10:43 +0200 Subject: [PATCH 25/33] fix custom_card_paddy_waste_collection --- .../custom_card_paddy_waste_collection.yaml | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml b/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml index f16ab9204..a46d4321b 100644 --- a/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml +++ b/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml @@ -6,10 +6,6 @@ custom_card_paddy_waste_collection: - operator: "template" value: "[[[ return states[entity.entity_id].attributes.daysTo == 0; ]]]" styles: - img_cell: - - background-color: "rgba(var(--color-red),0.5)" - icon: - - color: "rgba(var(--color-red),1)" custom_fields: notification: - border-radius: "50%" @@ -28,10 +24,6 @@ custom_card_paddy_waste_collection: - operator: "template" value: "[[[ return states[entity.entity_id].attributes.daysTo == 1; ]]]" styles: - img_cell: - - background-color: "rgba(var(--color-red),0.05)" - icon: - - color: "rgba(var(--color-red),1)" custom_fields: notification: - border-radius: "50%" @@ -65,6 +57,35 @@ custom_card_paddy_waste_collection: return "rgba(var(--color-red),1)"; ]]] 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: + - operator: "template" + value: "[[[ return states[entity.entity_id].attributes.daysTo == 0; ]]]" + styles: + img_cell: + - background-color: "rgba(var(--color-red),0.5)" + icon: + - color: "rgba(var(--color-red),1)" + - operator: "template" + value: "[[[ return states[entity.entity_id].attributes.daysTo == 1; ]]]" + styles: + img_cell: + - background-color: "rgba(var(--color-red),0.05)" + icon: + - color: "rgba(var(--color-red),1)" + item2: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" notification: > [[[ if (entity.state == 'unavailable' || states[entity.entity_id].attributes.daysTo == 0 || states[entity.entity_id].attributes.daysTo == 1){ From dbc10533445b4df0ce7b59acaac9b1c0f71ad1f5 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Mon, 27 Jun 2022 09:56:56 +0200 Subject: [PATCH 26/33] Add currency to translation engine --- .../lovelace/translations/default.yaml | 171 ++++++++++++++++++ .../chips/chip_power_consumption.yaml | 4 +- 2 files changed, 173 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml index a7dccffb2..e9a596376 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml @@ -8,6 +8,177 @@ ulm_translation_engine: ulm_translation_scenes: "[[[ return hass.resources[hass['language']]['ui.dialogs.quick-bar.commands.reload.scene']; ]]]" ulm_translation_source: "[[[ return hass.resources[hass['language']]['ui.card.media_player.source']; ]]]" ulm_translation_history: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.history']; ]]]" + ulm_translation_currency: > + [[[ + var hasscurrency = hass.config["currency"]; + var currency = + { "AFA": "؋", + "ALL": "Lek", + "DZD": "دج", + "AOA": "Kz", + "ARS": "$", + "AMD": "֏", + "AWG": "ƒ", + "AUD": "$", + "AZN": "m", + "BSD": "B$", + "BHD": ".د.ب", + "BDT": "৳", + "BBD": "Bds$", + "BYR": "Br", + "BEF": "fr", + "BZD": "$", + "BMD": "$", + "BTN": "Nu.", + "BTC": "฿", + "BOB": "Bs.", + "BAM": "KM", + "BWP": "P", + "BRL": "R$", + "GBP": "£", + "BND": "B$", + "BGN": "Лв.", + "BIF": "FBu", + "KHR": "KHR", + "CAD": "$", + "CVE": "$", + "KYD": "$", + "XOF": "CFA", + "XAF": "FCFA", + "XPF": "₣", + "CLP": "$", + "CNY": "¥", + "COP": "$", + "KMF": "CF", + "CDF": "FC", + "CRC": "₡", + "HRK": "kn", + "CUC": "$, CUC", + "CZK": "Kč", + "DKK": "Kr.", + "DJF": "Fdj", + "DOP": "$", + "XCD": "$", + "EGP": "ج.م", + "ERN": "Nfk", + "EEK": "kr", + "ETB": "Nkf", + "EUR": "€", + "FKP": "£", + "FJD": "FJ$", + "GMD": "D", + "GEL": "ლ", + "DEM": "DM", + "GHS": "GH₵", + "GIP": "£", + "GRD": "₯, Δρχ, Δρ", + "GTQ": "Q", + "GNF": "FG", + "GYD": "$", + "HTG": "G", + "HNL": "L", + "HKD": "$", + "HUF": "Ft", + "ISK": "kr", + "INR": "₹", + "IDR": "Rp", + "IRR": "﷼", + "IQD": "د.ع", + "ILS": "₪", + "ITL": "L,£", + "JMD": "J$", + "JPY": "¥", + "JOD": "ا.د", + "KZT": "лв", + "KES": "KSh", + "KWD": "ك.د", + "KGS": "лв", + "LAK": "₭", + "LVL": "Ls", + "LBP": "£", + "LSL": "L", + "LRD": "$", + "LYD": "د.ل", + "LTL": "Lt", + "MOP": "$", + "MKD": "ден", + "MGA": "Ar", + "MWK": "MK", + "MYR": "RM", + "MVR": "Rf", + "MRO": "MRU", + "MUR": "₨", + "MXN": "$", + "MDL": "L", + "MNT": "₮", + "MAD": "MAD", + "MZM": "MT", + "MMK": "K", + "NAD": "$", + "NPR": "₨", + "ANG": "ƒ", + "TWD": "$", + "NZD": "$", + "NIO": "C$", + "NGN": "₦", + "KPW": "₩", + "NOK": "kr", + "OMR": ".ع.ر", + "PKR": "₨", + "PAB": "B/.", + "PGK": "K", + "PYG": "₲", + "PEN": "S/.", + "PHP": "₱", + "PLN": "zł", + "QAR": "ق.ر", + "RON": "lei", + "RUB": "₽", + "RWF": "FRw", + "SVC": "₡", + "WST": "SAT", + "SAR": "﷼", + "RSD": "din", + "SCR": "SRe", + "SLL": "Le", + "SGD": "$", + "SKK": "Sk", + "SBD": "Si$", + "SOS": "Sh.so.", + "ZAR": "R", + "KRW": "₩", + "XDR": "SDR", + "LKR": "Rs", + "SHP": "£", + "SDG": ".س.ج", + "SRD": "$", + "SZL": "E", + "SEK": "kr", + "CHF": "CHf", + "SYP": "LS", + "STD": "Db", + "TJS": "SM", + "TZS": "TSh", + "THB": "฿", + "TOP": "$", + "TTD": "$", + "TND": "ت.د", + "TRY": "₺", + "TMT": "T", + "UGX": "USh", + "UAH": "₴", + "AED": "إ.د", + "UYU": "$", + "USD": "$", + "UZS": "лв", + "VUV": "VT", + "VEF": "Bs", + "VND": "₫", + "YER": "﷼", + "ZMK": "ZK" + } + return currency[hasscurrency]; + ]]] ulm_translation_hour: > [[[ var number = hass.resources[hass['language']]["ui.duration.hour"]; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_power_consumption.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_power_consumption.yaml index 4efffcfb1..3915ab4e2 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_power_consumption.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_power_consumption.yaml @@ -3,13 +3,13 @@ chip_power_consumption: template: - "chips" - - "ulm_language_variables" + - "ulm_translation_engine" triggers_update: "all" label: | [[[ var amount = variables.ulm_chip_electric_price != "" ? true : false if (amount){ - return "⚡ " + states[variables.ulm_chip_electric_price].state + variables.ulm_currency; + return "⚡ " + states[variables.ulm_chip_electric_price].state + variables.ulm_translation_currency; } else { return "⚡ " + states[variables.ulm_chip_electric_consumption].state + states[variables.ulm_chip_electric_consumption].attributes.unit_of_measurement; } From 27a008f77fb00b1c70b6c5b5f78ce40b3422ee4f Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:21:41 +0200 Subject: [PATCH 27/33] Set popup default --- .../ui_lovelace_minimalist/lovelace/custom_actions.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/custom_actions.yaml b/custom_components/ui_lovelace_minimalist/lovelace/custom_actions.yaml index 9cff8eb73..dc5d20be7 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/custom_actions.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/custom_actions.yaml @@ -2,11 +2,11 @@ ulm_custom_actions: variables: ulm_card_tap_action: "toggle" - ulm_card_hold_action: "more-info" + ulm_card_hold_action: "popup" ulm_card_double_tap_action: "adaptive" ulm_icon_tap_action: "toggle" - ulm_icon_hold_action: "more-info" + ulm_icon_hold_action: "popup" ulm_icon_double_tap_action: "adaptive" ulm_name_tap_action: "toggle" - ulm_name_hold_action: "more-info" + ulm_name_hold_action: "popup" ulm_name_double_tap_action: "adaptive" From 6295b3abc8404b6accee1e4a5d510e96363169fc Mon Sep 17 00:00:00 2001 From: Douglas Maitelli Date: Mon, 27 Jun 2022 08:29:35 -0700 Subject: [PATCH 28/33] Fix docs / variables for lock custom card --- .../custom_card_eraycetinay_lock/README.md | 18 ++++++++-------- .../custom_card_eraycetinay_lock.yaml | 21 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/custom_cards/custom_card_eraycetinay_lock/README.md b/custom_cards/custom_card_eraycetinay_lock/README.md index 3dad6d5da..777c75ac2 100644 --- a/custom_cards/custom_card_eraycetinay_lock/README.md +++ b/custom_cards/custom_card_eraycetinay_lock/README.md @@ -47,9 +47,9 @@ Version: 0.0.3 template: "custom_card_eraycetinay_lock" name: "Door Lock" variables: - custom_card_eraycetinay_lock_tap_control: true - custom_card_eraycetinay_lock_battery_level: sensor.door_battery - custom_card_eraycetinay_lock_door_open: binary_sensor.door_open + 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" @@ -66,42 +66,42 @@ Version: 0.0.3 Explanation - custom_card_eraycetinay_lock_tap_control + ulm_custom_card_eraycetinay_lock_tap_control true false no Lock/Unlock on tap action - custom_card_eraycetinay_lock_only_open + ulm_custom_card_eraycetinay_lock_only_open true false no Only use the card to open the door (always sends lock.open on tap) - custom_card_eraycetinay_lock_battery_level + ulm_custom_card_eraycetinay_lock_battery_level sensor.door_battery no Displays a warning when the battery is low. - custom_card_eraycetinay_lock_battery_warning + ulm_custom_card_eraycetinay_lock_battery_warning 25 20 no At what battery percentage should the low battery warning appear. - custom_card_eraycetinay_lock_battery_warning_low + ulm_custom_card_eraycetinay_lock_battery_warning_low 10 5 no At what battery percentage should the very low battery warning appear. - custom_card_eraycetinay_lock_door_open + ulm_custom_card_eraycetinay_lock_door_open binary_sensor.door_open no 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 7c9578aef..7c108074e 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 @@ -1,13 +1,12 @@ --- custom_card_eraycetinay_lock: template: - - "icon_info_bg" - "ulm_translation_engine" - "custom_card_eraycetinay_lock_language_variables" variables: - custom_card_eraycetinay_lock_battery_warning: 20 - custom_card_eraycetinay_lock_battery_warning_low: 5 + ulm_custom_card_eraycetinay_lock_battery_warning: 20 + ulm_custom_card_eraycetinay_lock_battery_warning_low: 5 tap_action: action: | [[[ @@ -89,10 +88,10 @@ custom_card_eraycetinay_lock: - line-height: "14px" - background-color: | [[[ - if (variables.custom_card_eraycetinay_lock_battery_level !== undefined) { - if (states[variables.custom_card_eraycetinay_lock_battery_level].state <= variables.custom_card_eraycetinay_lock_battery_warning_low) { + 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.custom_card_eraycetinay_lock_battery_level].state <= variables.custom_card_eraycetinay_lock_battery_warning) { + } 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)"; } } @@ -100,15 +99,15 @@ custom_card_eraycetinay_lock: custom_fields: notification_locked_and_opened: > [[[ - if (variables.custom_card_eraycetinay_lock_door_open !== undefined && (entity.state === "locked" && states[variables.custom_card_eraycetinay_lock_door_open].state === "on")) { - return ``; + 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.custom_card_eraycetinay_lock_battery_level !== undefined) { - if (variables.custom_card_eraycetinay_lock_battery_warning >= states[variables.custom_card_eraycetinay_lock_battery_level].state) { - return ` + 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 ` `; } From 87e59dbf1a7fe4e532f09191eabb2d50c71392a4 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 28 Jun 2022 09:50:29 +0200 Subject: [PATCH 29/33] adapt to style other fixes --- .../custom_card_paddy_dwd_pollen/README.md | 4 ++++ .../custom_card_paddy_dwd_pollen.yaml | 4 ++-- .../custom_card_paddy_waste_collection/README.md | 14 ++++++++++++++ .../custom_card_paddy_waste_collection.yaml | 3 +++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/custom_cards/custom_card_paddy_dwd_pollen/README.md b/custom_cards/custom_card_paddy_dwd_pollen/README.md index 26e672c61..2bdecc248 100644 --- a/custom_cards/custom_card_paddy_dwd_pollen/README.md +++ b/custom_cards/custom_card_paddy_dwd_pollen/README.md @@ -21,6 +21,10 @@ Version: 1.0.0 1.0.0 Initial release
+
+1.0.1 +Fix for UI Minimalist v1.0.1. +
## Usage 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 863f5a399..1fee063b8 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 @@ -4,8 +4,8 @@ custom_card_paddy_dwd_pollen: - "card_generic_swap" - "custom_card_paddy_dwd_pollen_language_variables" variables: - ulm_card_generic_icon: "[[[ return entity.attributes.icon ]]]" - ulm_card_generic_name: "[[[ return entity.attributes.friendly_name ]]]" + 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: diff --git a/custom_cards/custom_card_paddy_waste_collection/README.md b/custom_cards/custom_card_paddy_waste_collection/README.md index 5371924a7..a5bae83a2 100644 --- a/custom_cards/custom_card_paddy_waste_collection/README.md +++ b/custom_cards/custom_card_paddy_waste_collection/README.md @@ -21,6 +21,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix for UI Minimalist v1.0.1. +
## Usage @@ -63,6 +67,16 @@ This card needs the following to function correctly: yes Your waste collection sensor. See HA example on how to configure. +ulm_custom_card_paddy_waste_collection_name +Paper +no + + +ulm_custom_card_paddy_waste_collection_icon +mdi:trash-can +no + + ## Template code diff --git a/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml b/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml index a46d4321b..93209fa1a 100644 --- a/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml +++ b/custom_cards/custom_card_paddy_waste_collection/custom_card_paddy_waste_collection.yaml @@ -2,6 +2,9 @@ custom_card_paddy_waste_collection: template: - "card_generic_swap" + variables: + ulm_card_generic_swap_name: "[[[ return variables.ulm_custom_card_paddy_waste_collection_name; ]]]" + ulm_card_generic_swap_icon: "[[[ return variables.ulm_custom_card_paddy_waste_collection_icon; ]]]" state: - operator: "template" value: "[[[ return states[entity.entity_id].attributes.daysTo == 0; ]]]" From 9453d18a4dfb817a82a640dd792842c40703dc4c Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 28 Jun 2022 10:00:50 +0200 Subject: [PATCH 30/33] Improve readability --- .../lovelace/translations/default.yaml | 216 +++++++++--------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml index e9a596376..c3ff59423 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml @@ -8,6 +8,114 @@ ulm_translation_engine: ulm_translation_scenes: "[[[ return hass.resources[hass['language']]['ui.dialogs.quick-bar.commands.reload.scene']; ]]]" ulm_translation_source: "[[[ return hass.resources[hass['language']]['ui.card.media_player.source']; ]]]" ulm_translation_history: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.history']; ]]]" + ulm_translation_hour: > + [[[ + var number = hass.resources[hass['language']]["ui.duration.hour"]; + var matches = number.match(/[^{\}]+(?=})/g); + var hour = "Hour"; + if (matches) { + var hour = matches[1]; + } + return(hour); + ]]] + ulm_translation_hours: > + [[[ + var number = hass.resources[hass['language']]["ui.duration.hour"]; + var matches = number.match(/[^{\}]+(?=})/g); + var hour = "Hours"; + if (matches) { + var hour = matches[2]; + } + return(hour); + ]]] + ulm_translation_hvac: > + [[[ + if (typeof(entity) !== 'undefined' && entity !== undefined){ + let state = entity.state; + let d_class = entity.attributes.device_class; + let def = ["unknown", "unavailable"]; + let lang = hass["language"]; + let action = entity.attributes.hvac_action; + let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); + var mode = hass.resources[lang]["state_attributes." + domain + ".hvac_action." + action]; + if (def.includes(state)) { + var mode = hass.resources[lang]["state.default." + state ]; + } + var label = hass.resources[lang]["component." + domain + ".state._." + state]; + var translation = label ? label : state; + return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + (entity.state !='off' ? ' (' + mode + ')' : ''); + } + ]]] + ulm_translation_off: "[[[ return hass.resources[hass['language']]['state.default.off']; ]]]" + ulm_translation_on: "[[[ return hass.resources[hass['language']]['state.default.on']; ]]]" + ulm_translation_state: > + [[[ + if (typeof(entity) !== 'undefined' && entity !== undefined){ + let state = entity.state; + let d_class = entity.attributes.device_class; + let def = ["unknown", "unavailable"]; + let lang = hass["language"]; + let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); + var translation = hass.resources[lang]["component." + domain + ".state._." + state] + if (def.includes(state)) { + var translation = hass.resources[lang]["state.default." + state ]; + } + else if (domain == "binary_sensor" && d_class != ''){ + var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] + } + return translation ? translation : state; + } + ]]] + ulm_translation_state_reverse: > + [[[ + if (typeof(entity) !== 'undefined' && entity !== undefined){ + let state = entity.state; + let def = ["unknown", "unavailable"]; + let lang = hass["language"]; + if (state === "on"){ + var translation = hass.resources[lang]["state.default.off"]; + } else if (state === "off"){ + var translation = hass.resources[lang]["state.default.on"]; + } + if (def.includes(state)) { + var translation = hass.resources[lang]["state.default." + state ]; + } + return translation ? translation : state; + } + ]]] + ulm_translation_state_unit: > + [[[ + if (typeof(entity) !== 'undefined' && entity !== undefined){ + let state = entity.state; + let d_class = entity.attributes.device_class; + let def = ["unknown", "unavailable"]; + let lang = hass["language"]; + let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); + let unit = entity.attributes.unit_of_measurement != null ? " " + entity.attributes.unit_of_measurement : ""; + + if(hass.resources[lang]["component." + domain + ".state._." + state]){ + var translation = hass.resources[lang]["component." + domain + ".state._." + state] + unit + } else { + var translation = state + unit; + } + if (def.includes(state)) { + var translation = hass.resources[lang]["state.default." + state ]; + } + else if (domain == "binary_sensor" && d_class != ''){ + var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] + } + else if (domain == "media_player" && d_class != ''){ + if (state == 'idle' || state == 'paused') + var translation = hass.resources[lang]["component." + domain + ".state." + state]; + else { + var translation = (entity.attributes.source) + ' • ' + ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ; + } + } + return translation ? translation : state; + } + ]]] + ulm_translation_statistics: "[[[ return hass.resources[hass['language']]['ui.components.statistic-picker.statistic']; ]]]" + ulm_translation_unavailable: "[[[ return hass.resources[hass['language']]['state.default.unavailable']; ]]]" ulm_translation_currency: > [[[ var hasscurrency = hass.config["currency"]; @@ -179,111 +287,3 @@ ulm_translation_engine: } return currency[hasscurrency]; ]]] - ulm_translation_hour: > - [[[ - var number = hass.resources[hass['language']]["ui.duration.hour"]; - var matches = number.match(/[^{\}]+(?=})/g); - var hour = "Hour"; - if (matches) { - var hour = matches[1]; - } - return(hour); - ]]] - ulm_translation_hours: > - [[[ - var number = hass.resources[hass['language']]["ui.duration.hour"]; - var matches = number.match(/[^{\}]+(?=})/g); - var hour = "Hours"; - if (matches) { - var hour = matches[2]; - } - return(hour); - ]]] - ulm_translation_hvac: > - [[[ - if (typeof(entity) !== 'undefined' && entity !== undefined){ - let state = entity.state; - let d_class = entity.attributes.device_class; - let def = ["unknown", "unavailable"]; - let lang = hass["language"]; - let action = entity.attributes.hvac_action; - let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); - var mode = hass.resources[lang]["state_attributes." + domain + ".hvac_action." + action]; - if (def.includes(state)) { - var mode = hass.resources[lang]["state.default." + state ]; - } - var label = hass.resources[lang]["component." + domain + ".state._." + state]; - var translation = label ? label : state; - return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + (entity.state !='off' ? ' (' + mode + ')' : ''); - } - ]]] - ulm_translation_off: "[[[ return hass.resources[hass['language']]['state.default.off']; ]]]" - ulm_translation_on: "[[[ return hass.resources[hass['language']]['state.default.on']; ]]]" - ulm_translation_state: > - [[[ - if (typeof(entity) !== 'undefined' && entity !== undefined){ - let state = entity.state; - let d_class = entity.attributes.device_class; - let def = ["unknown", "unavailable"]; - let lang = hass["language"]; - let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); - var translation = hass.resources[lang]["component." + domain + ".state._." + state] - if (def.includes(state)) { - var translation = hass.resources[lang]["state.default." + state ]; - } - else if (domain == "binary_sensor" && d_class != ''){ - var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] - } - return translation ? translation : state; - } - ]]] - ulm_translation_state_reverse: > - [[[ - if (typeof(entity) !== 'undefined' && entity !== undefined){ - let state = entity.state; - let def = ["unknown", "unavailable"]; - let lang = hass["language"]; - if (state === "on"){ - var translation = hass.resources[lang]["state.default.off"]; - } else if (state === "off"){ - var translation = hass.resources[lang]["state.default.on"]; - } - if (def.includes(state)) { - var translation = hass.resources[lang]["state.default." + state ]; - } - return translation ? translation : state; - } - ]]] - ulm_translation_state_unit: > - [[[ - if (typeof(entity) !== 'undefined' && entity !== undefined){ - let state = entity.state; - let d_class = entity.attributes.device_class; - let def = ["unknown", "unavailable"]; - let lang = hass["language"]; - let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); - let unit = entity.attributes.unit_of_measurement != null ? " " + entity.attributes.unit_of_measurement : ""; - - if(hass.resources[lang]["component." + domain + ".state._." + state]){ - var translation = hass.resources[lang]["component." + domain + ".state._." + state] + unit - } else { - var translation = state + unit; - } - if (def.includes(state)) { - var translation = hass.resources[lang]["state.default." + state ]; - } - else if (domain == "binary_sensor" && d_class != ''){ - var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state] - } - else if (domain == "media_player" && d_class != ''){ - if (state == 'idle' || state == 'paused') - var translation = hass.resources[lang]["component." + domain + ".state." + state]; - else { - var translation = (entity.attributes.source) + ' • ' + ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ; - } - } - return translation ? translation : state; - } - ]]] - ulm_translation_statistics: "[[[ return hass.resources[hass['language']]['ui.components.statistic-picker.statistic']; ]]]" - ulm_translation_unavailable: "[[[ return hass.resources[hass['language']]['state.default.unavailable']; ]]]" From 7cc4263e8394e1feea0d36711ca372521b12b66c Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 28 Jun 2022 10:07:33 +0200 Subject: [PATCH 31/33] Auto switch to horizontal arrows when used with gate --- .../ulm_templates/card_templates/cards/card_cover.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 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 130b98413..a98c333a9 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 @@ -221,7 +221,7 @@ card_cover: entity_id: "[[[ return entity.entity_id ]]]" icon: >- [[[ - if (variables.ulm_card_cover_display_left_right){ + if (variables.ulm_card_cover_display_left_right || variables.ulm_card_cover_gate){ return "mdi:arrow-left"; } if (variables.ulm_card_curtain_display_collapse_expand){ @@ -255,7 +255,7 @@ card_cover: entity_id: "[[[ return entity.entity_id ]]]" icon: >- [[[ - if (variables.ulm_card_cover_display_left_right){ + if (variables.ulm_card_cover_display_left_right || variables.ulm_card_cover_gate){ return "mdi:arrow-right"; } if (variables.ulm_card_curtain_display_collapse_expand){ From b2463c3a2cb572c9315d80c67909d3c68086ee1a Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 28 Jun 2022 10:10:59 +0200 Subject: [PATCH 32/33] update right condition --- .../ulm_templates/card_templates/cards/card_cover.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 a98c333a9..1981897ce 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 @@ -221,10 +221,10 @@ card_cover: entity_id: "[[[ return entity.entity_id ]]]" icon: >- [[[ - if (variables.ulm_card_cover_display_left_right || variables.ulm_card_cover_gate){ + if (variables.ulm_card_cover_display_left_right){ return "mdi:arrow-left"; } - if (variables.ulm_card_curtain_display_collapse_expand){ + if (variables.ulm_card_curtain_display_collapse_expand || variables.ulm_card_cover_gate){ return "mdi:arrow-collapse-horizontal"; } return "mdi:arrow-down"; @@ -255,10 +255,10 @@ card_cover: entity_id: "[[[ return entity.entity_id ]]]" icon: >- [[[ - if (variables.ulm_card_cover_display_left_right || variables.ulm_card_cover_gate){ + if (variables.ulm_card_cover_display_left_right){ return "mdi:arrow-right"; } - if (variables.ulm_card_curtain_display_collapse_expand){ + if (variables.ulm_card_curtain_display_collapse_expand || variables.ulm_card_cover_gate){ return "mdi:arrow-expand-horizontal"; } return "mdi:arrow-up"; From 8a3bb9b9c4848a484e09a17487f98198f8a2618f Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:05:07 +0200 Subject: [PATCH 33/33] Update docs --- docs/usage/cards/card_binary_sensor.md | 2 ++ docs/usage/cards/card_binary_sensor_alert.md | 2 ++ docs/usage/cards/card_generic.md | 2 ++ docs/usage/cards/card_generic_swap.md | 2 ++ docs/usage/cards/card_graph.md | 1 + docs/usage/cards/card_input_boolean.md | 3 ++- docs/usage/cards/card_media_player.md | 1 - docs/usage/cards/card_power_outlet.md | 3 ++- 8 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/usage/cards/card_binary_sensor.md b/docs/usage/cards/card_binary_sensor.md index f10df51fa..5ceb3ae32 100644 --- a/docs/usage/cards/card_binary_sensor.md +++ b/docs/usage/cards/card_binary_sensor.md @@ -17,6 +17,8 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi |----------|---------|------------------|-------------------| | entity | | :material-check: | | | ulm_show_last_changed | | :material-close: | `true` or `false` | +| ulm_card_binary_sensor_name | | :material-close: | Set custom Name | +| ulm_card_binary_sensor_icon | | :material-close: | Set custom Icon | !!! Warning "⚠️ Breaking Change `v1.0.1`" diff --git a/docs/usage/cards/card_binary_sensor_alert.md b/docs/usage/cards/card_binary_sensor_alert.md index 39f5d0c29..619026fff 100644 --- a/docs/usage/cards/card_binary_sensor_alert.md +++ b/docs/usage/cards/card_binary_sensor_alert.md @@ -17,6 +17,8 @@ The `binary-sensor-card` is to show the state (on/off, open/close, etc.) of a bi |----------|---------|------------------|-------------------| | entity | | :material-check: | | | ulm_show_last_changed | | :material-close: | `true` or `false` | +| ulm_card_binary_sensor_alert_name | | :material-close: | Set custom Name | +| ulm_card_binary_sensor_alert_icon | | :material-close: | Set custom Icon | !!! Warning "⚠️ Breaking Change `v1.0.1`" diff --git a/docs/usage/cards/card_generic.md b/docs/usage/cards/card_generic.md index 2a1bb5454..b987c6ba9 100644 --- a/docs/usage/cards/card_generic.md +++ b/docs/usage/cards/card_generic.md @@ -16,6 +16,8 @@ This is the `generic-card` to display values from a sensor, eg. to show humidity | Variable | Default | Required | Notes | |----------|---------|------------------|-------------------| | entity | | :material-check: | | +| ulm_card_generic_name | | :material-close: | Set custom Name | +| ulm_card_generic_icon | | :material-close: | Set custom Icon | ## Usage diff --git a/docs/usage/cards/card_generic_swap.md b/docs/usage/cards/card_generic_swap.md index 9233f90c6..00f1544eb 100644 --- a/docs/usage/cards/card_generic_swap.md +++ b/docs/usage/cards/card_generic_swap.md @@ -16,6 +16,8 @@ This is a `generic-card` with swapped label and name. | Variable | Default | Required | Notes | |----------|---------|------------------|-------------------| | entity | | :material-check: | | +| ulm_card_generic_swap_name | | :material-close: | Set custom Name | +| ulm_card_generic_swap_icon | | :material-close: | Set custom Icon | ## Usage diff --git a/docs/usage/cards/card_graph.md b/docs/usage/cards/card_graph.md index 980313956..f20c676dc 100644 --- a/docs/usage/cards/card_graph.md +++ b/docs/usage/cards/card_graph.md @@ -17,6 +17,7 @@ The `card_graph` shows an entity with the actual state and a *min-graph-card* in |----------|---------|------------------|-------------------| | ulm_card_graph_color | | :material-close: | This is to adjust your color value. Use a CSS varible from HA or set a color value (eg. #FFFFFF) | | ulm_card_graph_name | | :material-close: | Enable background | +| ulm_card_graph_icon | | :material-close: | Set custom icon | | ulm_card_graph_entity | | :material-check: | Your entity_id for the temperature sensor | | ulm_card_graph_entity2 | | :material-close: | Your entity_id for the second temperature sensor | | ulm_card_graph_color2 | | :material-close: | This is to adjust your color value of the second graph. Use a CSS varible from HA or set a color value (eg. #FFFFFF) | diff --git a/docs/usage/cards/card_input_boolean.md b/docs/usage/cards/card_input_boolean.md index 3d5d11e9b..7aa504522 100644 --- a/docs/usage/cards/card_input_boolean.md +++ b/docs/usage/cards/card_input_boolean.md @@ -16,7 +16,8 @@ The `input-boolean-card` is to switch an `input_boolean` on or off. | Variable | Default | Required | Notes | |----------|---------|------------------|-------------------| | entity | | :material-check: | | -| name | | :material-close: | | +| ulm_card_input_boolean_name | | :material-close: | Set custom Name | +| ulm_card_input_boolean_icon | | :material-close: | Set custom Icon | ## Usage diff --git a/docs/usage/cards/card_media_player.md b/docs/usage/cards/card_media_player.md index 1d14bb266..d2eb35283 100644 --- a/docs/usage/cards/card_media_player.md +++ b/docs/usage/cards/card_media_player.md @@ -22,7 +22,6 @@ hide: | Variable | Default | Required | Notes | | -------------------------------------------- | ------- | ---------------- | ----------------------------------------------- | | entity | | :material-check: | The media-player entity | -| name | | :material-check: | Name to display for your media-player | | ulm_card_media_player_name | | | Name to display for your media-player | | ulm_card_media_player_icon | | | Change the icon displayed | | ulm_card_media_player_enable_art | false | | Enable album picture on background | diff --git a/docs/usage/cards/card_power_outlet.md b/docs/usage/cards/card_power_outlet.md index b691c3a47..1336a2501 100644 --- a/docs/usage/cards/card_power_outlet.md +++ b/docs/usage/cards/card_power_outlet.md @@ -16,7 +16,8 @@ This is the `power-outlet-card`. It shows you the state of a power outlet, and i | Variable | Default | Required | Notes | |----------|---------|------------------|-------------------| | entity | | :material-check: | | -|name| | :material-check: | Enable background | +| ulm_card_power_outlet_name | | :material-close: | Set custom Name | +| ulm_card_power_outlet_icon | | :material-close: | Set custom Icon | |ulm_card_power_outlet_consumption_sensor| | :material-close: | If you set this sensor, the `power-outlet-card` shows the energy consumption next to the state. | ## Usage