From 94514ea4ec3f398a7a4a4005e83c00b4bc68ccd5 Mon Sep 17 00:00:00 2001 From: kepath <35769141+kepath@users.noreply.github.com> Date: Tue, 27 Sep 2022 12:17:55 +0100 Subject: [PATCH 01/26] Update card_room.yaml Add additional temperature sensor --- .../lovelace/ulm_templates/card_templates/cards/card_room.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml index 18ba7b7b0..0cc571673 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml @@ -21,7 +21,7 @@ card_room: label: |- [[[ if (variables.label_use_temperature) { - return (entity?.attributes?.current_temperature || entity?.attributes?.temperature || entity?.state || '-') + (entity?.attributes?.unit_of_measurement || '°C'); + return (entity?.attributes?.current_temperature || entity?.attributes?.temperature || entity?.attributes?.device_temperature || entity?.state || '-') + (entity?.attributes?.unit_of_measurement || '°C'); } else if (variables.label_use_brightness && entity?.state == "on" && entity?.attributes?.brightness != null) { let bri = Math.round(entity?.attributes?.brightness / 2.55); return (bri ? bri : "0") + "%"; From 54fc378d97b50d73bf203c7a1ca40fadb8a1fcfc Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:07:45 +0200 Subject: [PATCH 02/26] [popup_mediaplayer]Add auto-generated source selector --- .../popup_buttons/popup_button_source.yaml | 28 +++++ .../popup_layouts/popup_media_player_row.yaml | 41 ++++++ .../popups/popup_media_player_infos.yaml | 41 +++++- .../popups/popup_media_player_source.yaml | 119 ++++++++++++++++++ .../popups/popup_media_player_volume.yaml | 3 + 5 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml index 000e25489..fd5b66823 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml @@ -13,3 +13,31 @@ popup_button_source: - background: "none" - box-shadow: "none" - border: "1px solid rgba(var(--color-theme),0.25)" + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-max-width: auto + --popup-min-width: 800px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: "popup_media_player_source" + entity: "[[[ return entity.entity_id ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml new file mode 100644 index 000000000..88b64b6ad --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml @@ -0,0 +1,41 @@ +--- +popup_media_player_row: + show_icon: false + show_name: true + show_label: false + extra_styles: | + ha-card:hover { + background-color: var(--primary-background-color); + } + styles: + grid: + - grid-template-areas: "n" + card: + - padding: "2px 0px" + - height: "42px" + - border-radius: "10px" + - width: "40vh" + name: + - align-self: "center" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - margin-right: "12px" + name: > + [[[ + var name = entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; + return name; + ]]] + state: + - operator: "template" + value: "[[[ return entity.attributes.source == entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; ]]]" + styles: + card: + - background-color: "rgba(var(--color-theme),0.2)" + tap_action: + action: "call-service" + service: "media_player.select_source" + service_data: + entity_id: "[[[ return entity.entity_id; ]]]" + source: "[[[ return entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index c44e6147b..8e6390077 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -15,6 +15,7 @@ popup_media_player_infos: - box-shadow: "none" - padding: "0% 2% 2% 2%" - border-radius: "none" + - min-height: "80vh" custom_fields: header: - align-self: "start" @@ -27,10 +28,11 @@ popup_media_player_infos: content2: - align-self: "center" - justify-self: "center" + content3: + - display: "none" footer: - align-self: "start" - - margin-top: "25px" - - padding-bottom: "4%" + - padding-bottom: "2%" extra_styles: | @media (max-width: 800px) { #container { @@ -41,6 +43,8 @@ popup_media_player_infos: #content2 { display: none; } + #content3 { + display: none; } custom_fields: header: @@ -297,3 +301,36 @@ popup_media_player_infos: align-items: center; background: none; } + content3: + card: + type: "vertical-stack" + cards: > + [[[ + let rows = []; + + function generate_source_items(index) { + var row = { + 'type': 'custom:button-card', + 'template': 'popup_media_player_row', + 'entity': entity.entity_id, + 'variables': { + 'ulm_popup_media_entity_idx': index + } + }; + return row; + } + + let source_list = entity.attributes.source_list; + + let length_list = source_list.length + let index = 0; + for (let source in source_list){ + rows.push(generate_source_items(index)); + index++ + + if(index >= length_list){ + break; + } + } + return rows; + ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml new file mode 100644 index 000000000..99b25d050 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml @@ -0,0 +1,119 @@ +--- +popup_media_player_source: + template: "popup_media_player_infos" + styles: + grid: + - grid-template-areas: "'header' 'content3' 'footer'" + - grid-template-columns: "1fr" + - grid-template-rows: "16vh max-content 14vh" + - column-gap: "0px" + custom_fields: + footer: + - display: "flex" + - justify-self: "center" + - justify-content: "center" + - z-index: "1000" + - position: "fixed" + - bottom: "2.2%" + - background-color: "var(--primary-background-color)" + - min-width: "42vh" + content1: + - display: "none" + content2: + - display: "none" + content3: + - display: "block" + - justify-self: "center" + - align-self: "start" + extra_styles: | + @media (max-width: 800px) { + #container { + grid-template-areas: "header" "content3" "footer" !important; + grid-template-rows: 16vh max-content 14vh !important; + grid-template-columns: 1fr !important; + } + #content1 { + display: none; + } + #content2 { + display: none; + } + #footer { + bottom: 0 !important; + padding-bottom: 6.2% !important; + } + custom_fields: + footer: + card: + type: "custom:button-card" + template: "popup_list_items" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "popup_button_back" + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-min-width: 1000px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: "popup_media_player_infos" + entity: "[[[ return entity.entity_id; ]]]" + item2: + card: + type: "custom:button-card" + template: "popup_button_power" + entity: "[[[ return entity.entity_id; ]]]" + item3: + card: + type: "custom:button-card" + template: "popup_button_volume" + icon: + entity: "[[[ return entity.entity_id; ]]]" + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-min-width: 1000px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: "popup_media_player_volume" + entity: "[[[ return entity.entity_id; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml index 6dbf5fa7e..8f970230c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml @@ -22,6 +22,9 @@ popup_media_player_volume: #content1 { display: none; } + #content3 { + display: none; + } custom_fields: footer: card: From c46147b2b29a2e1a06d95065b44550b3b3e4c080 Mon Sep 17 00:00:00 2001 From: Kevin Thorn Date: Fri, 30 Sep 2022 22:04:31 +0100 Subject: [PATCH 03/26] Create chip_short_date_with_day.yaml short form date chip, without the weather --- .../chips/chip_short_date_with_day.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_short_date_with_day.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_short_date_with_day.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_short_date_with_day.yaml new file mode 100644 index 000000000..cec1a6b0b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_short_date_with_day.yaml @@ -0,0 +1,20 @@ +--- +chip_short_date_with_day: + template: "chips" + variables: + ulm_language: > + [[[ + return hass["language"]; + ]]] + triggers_update: "all" + label: | + [[[ + var locale = variables.ulm_language; + let dt = new Intl.DateTimeFormat(locale , { + weekday: "short", + day: "numeric", + month: "short" + }); + let formatted_date = dt.format(Date.now()) + return formatted_date + ]]] From 30cfcea2ed1f4fbb19d15af5a8762cee6fcc2558 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:45:42 +0200 Subject: [PATCH 04/26] Adapt for mixed casing in preset mode --- .../popups/popup_thermostat_temperature.yaml | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml index c39dcbf01..a8462b26c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml @@ -71,41 +71,41 @@ popup_thermostat_temperature: [[[ var areas = []; if (variables.ulm_card_thermostat_preset_mode){ - if (entity.attributes.preset_modes.includes("none")) { + if (entity.attributes.preset_modes.toLowerCase().includes("none")) { areas.push("none"); } - if (entity.attributes.preset_modes.includes("away")) { + if (entity.attributes.preset_modes.toLowerCase().includes("away")) { areas.push("away"); } - if (entity.attributes.preset_modes.includes("comfort")) { + if (entity.attributes.preset_modes.toLowerCase().includes("comfort")) { areas.push("comfort"); } - if (entity.attributes.preset_modes.includes("home")) { + if (entity.attributes.preset_modes.toLowerCase().includes("home")) { areas.push("home"); } - if (entity.attributes.preset_modes.includes("sleep")) { + if (entity.attributes.preset_modes.toLowerCase().includes("sleep")) { areas.push("sleep"); } - if (entity.attributes.preset_modes.includes("activity")) { + if (entity.attributes.preset_modes.toLowerCase().includes("activity")) { areas.push("activity"); } } else { - if (entity.attributes.hvac_modes.includes("auto")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("auto")) { areas.push("auto"); } - if (entity.attributes.hvac_modes.includes("heat")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("heat")) { areas.push("heat"); } - if (entity.attributes.hvac_modes.includes("cool")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("cool")) { areas.push("cool"); } - if (entity.attributes.hvac_modes.includes("dry")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("dry")) { areas.push("dry"); } - if (entity.attributes.hvac_modes.includes("fan_only")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("fan_only")) { areas.push("fan_only"); } - if (entity.attributes.hvac_modes.includes("heat_cool")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("heat_cool")) { areas.push("heat_cool"); } } @@ -115,41 +115,41 @@ popup_thermostat_temperature: [[[ var columns = []; if (variables.ulm_card_thermostat_preset_mode){ - if (entity.attributes.preset_modes.includes("none")) { + if (entity.attributes.preset_modes.toLowerCase().includes("none")) { columns.push("1fr"); } - if (entity.attributes.preset_modes.includes("away")) { + if (entity.attributes.preset_modes.toLowerCase().includes("away")) { columns.push("1fr"); } - if (entity.attributes.preset_modes.includes("comfort")) { + if (entity.attributes.preset_modes.toLowerCase().includes("comfort")) { columns.push("1fr"); } - if (entity.attributes.preset_modes.includes("home")) { + if (entity.attributes.preset_modes.toLowerCase().includes("home")) { columns.push("1fr"); } - if (entity.attributes.preset_modes.includes("sleep")) { + if (entity.attributes.preset_modes.toLowerCase().includes("sleep")) { columns.push("1fr"); } - if (entity.attributes.preset_modes.includes("activity")) { + if (entity.attributes.preset_modes.toLowerCase().includes("activity")) { columns.push("1fr"); } } else { - if (entity.attributes.hvac_modes.includes("auto")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("auto")) { columns.push("1fr"); } - if (entity.attributes.hvac_modes.includes("heat")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("heat")) { columns.push("1fr"); } - if (entity.attributes.hvac_modes.includes("cool")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("cool")) { columns.push("1fr"); } - if (entity.attributes.hvac_modes.includes("dry")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("dry")) { columns.push("1fr"); } - if (entity.attributes.hvac_modes.includes("fan_only")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("fan_only")) { columns.push("1fr"); } - if (entity.attributes.hvac_modes.includes("heat_cool")) { + if (entity.attributes.hvac_modes.toLowerCase().includes("heat_cool")) { columns.push("1fr"); } } @@ -166,7 +166,7 @@ popup_thermostat_temperature: auto: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("auto")) { + if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("auto")) { return "block"; } else { return "none"; @@ -175,7 +175,7 @@ popup_thermostat_temperature: heat: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat")) { + if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("heat")) { return "block"; } else { return "none"; @@ -184,7 +184,7 @@ popup_thermostat_temperature: cool: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("cool") ) { + if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("cool") ) { return "block"; } else { return "none"; @@ -193,7 +193,7 @@ popup_thermostat_temperature: dry: - display: > [[[ - if ( !variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("dry")) { + if ( !variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("dry")) { return "block"; } else { return "none"; @@ -202,7 +202,7 @@ popup_thermostat_temperature: fan_only: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("fan_only")) { + if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("fan_only")) { return "block"; } else { return "none"; @@ -211,7 +211,7 @@ popup_thermostat_temperature: heat_cool: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat_cool")) { + if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.toLowerCase().includes("heat_cool")) { return "block"; } else { return "none"; @@ -220,7 +220,7 @@ popup_thermostat_temperature: none: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("none")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("none")) { return "block"; } else { return "none"; @@ -229,7 +229,7 @@ popup_thermostat_temperature: away: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("away")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("away")) { return "block"; } else { return "none"; @@ -238,7 +238,7 @@ popup_thermostat_temperature: comfort: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("comfort")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("comfort")) { return "block"; } else { return "none"; @@ -247,7 +247,7 @@ popup_thermostat_temperature: home: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("home")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("home")) { return "block"; } else { return "none"; @@ -256,7 +256,7 @@ popup_thermostat_temperature: sleep: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("sleep")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("sleep")) { return "block"; } else { return "none"; @@ -265,7 +265,7 @@ popup_thermostat_temperature: activity: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("activity")) { + if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.toLowerCase().includes("activity")) { return "block"; } else { return "none"; @@ -439,7 +439,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "none" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('none') ? 'none' : 'None' ]]]" styles: card: - background-color: "transparent" @@ -449,7 +449,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'none' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'none' ]]]" styles: card: - background-color: "var(--card-background-color)" @@ -466,7 +466,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "away" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('away') ? 'away' : 'Away' ]]]" styles: card: - background-color: "transparent" @@ -476,7 +476,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'away' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'away' ]]]" styles: card: - background-color: "var(--card-background-color)" @@ -493,7 +493,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "comfort" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('comfort') ? 'comfort' : 'Comfort' ]]]" styles: card: - background-color: "transparent" @@ -503,7 +503,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'comfort' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'comfort' ]]]" styles: card: - background-color: "var(--card-background-color)" @@ -520,7 +520,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "home" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('home') ? 'home' : 'Home' ]]]" styles: card: - background-color: "transparent" @@ -530,7 +530,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'home' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'home' ]]]" styles: card: - background-color: "var(--card-background-color)" @@ -547,7 +547,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "sleep" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('sleep') ? 'sleep' : 'Sleep' ]]]" styles: card: - background-color: "transparent" @@ -557,7 +557,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'sleep' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'sleep' ]]]" styles: card: - background-color: "var(--card-background-color)" @@ -574,7 +574,7 @@ popup_thermostat_temperature: service: "climate.set_preset_mode" service_data: entity_id: "[[[ return entity.entity_id ]]]" - preset_mode: "activity" + preset_mode: "[[[ return entity.attributes.preset_mode.includes('activity') ? 'activity' : 'Activity' ]]]" styles: card: - background-color: "transparent" @@ -584,7 +584,7 @@ popup_thermostat_temperature: - box-shadow: "none" state: - operator: "template" - value: "[[[ return entity.attributes.preset_mode == 'activity' ]]]" + value: "[[[ return entity.attributes.preset_mode.toLowerCase() == 'activity' ]]]" styles: card: - background-color: "var(--card-background-color)" From 6586a694c23e391980459089eac180c8a829a16d Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:27:02 +0200 Subject: [PATCH 05/26] Add source and power button --- .../cards/card_media_player.yaml | 88 ++++++++++++++++++- .../popup_media_player_source_card.yaml | 18 ++++ 2 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source_card.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml index 66b3a06ec..48dbd37b5 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml @@ -14,6 +14,7 @@ card_media_player: ulm_card_media_player_player_controls_entity: "[[[ return entity.entity_id ]]]" ulm_card_media_player_enable_popup: false ulm_card_media_player_more_info: false + ulm_card_media_player_power_button: false triggers_update: "all" show_icon: false show_name: false @@ -62,6 +63,11 @@ card_media_player: : '' ]]] custom_fields: + power: + - display: "[[[ return variables.ulm_card_media_player_power_button ? 'block' : 'none']]]" + - position: "absolute" + - top: "12px" + - right: "12px" item2: - display: | [[[ @@ -85,6 +91,32 @@ card_media_player: return "none"; ]]] custom_fields: + power: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + template: "widget_icon" + icon: "mdi:power" + tap_action: + action: "toggle" + styles: + img_cell: + - width: "42px" + - heigth: "42px" + card: + - background-color: | + [[[ + return variables.ulm_card_media_player_enable_art && states[entity.entity_id].attributes.entity_picture != null + ? 'rgba(0, 0, 0, 0.2)' + : 'rgba(var(--color-theme),0.05)' + ]]] + icon: + - color: | + [[[ + return variables.ulm_card_media_player_enable_art && states[entity.entity_id].attributes.entity_picture != null + ? 'white' + : 'rgba(var(--color-theme), 0.9)' + ]]] item1: card: type: "custom:button-card" @@ -225,7 +257,7 @@ card_media_player: item2: card: type: "custom:button-card" - template: "list_3_items" + template: "list_4_items" styles: card: - padding: "0px" @@ -293,10 +325,10 @@ card_media_player: entity: "[[[ return entity.entity_id; ]]]" tap_action: action: "call-service" - service: "media_player.media_play_pause" + service: "[[[ return (entity.attributes?.media_duration > 0) ? 'media_player.media_play_pause' : entity.state =='playing' ? 'media_player.media_stop' : 'media_player.media_play']]]" service_data: entity_id: "[[[ return variables.ulm_card_media_player_player_controls_entity ]]]" - icon: "mdi:pause" + icon: "[[[ return (entity.attributes?.media_duration > 0) ? 'mdi:pause' : 'mdi:stop' ]]]" state: - value: "paused" icon: "mdi:play" @@ -304,6 +336,8 @@ card_media_player: icon: "mdi:play" - value: "standby" icon: "mdi:play" + - value: "idle" + icon: "mdi:play" styles: card: - background-color: | @@ -358,6 +392,54 @@ card_media_player: ? 'white' : 'rgba(var(--color-theme), 0.9)' ]]] + item4: + card: + type: "custom:button-card" + template: "widget_icon" + icon: "mdi:playlist-music" + styles: + card: + - background-color: | + [[[ + return variables.ulm_card_media_player_enable_art && states[entity.entity_id].attributes.entity_picture != null + ? 'rgba(0, 0, 0, 0.2)' + : 'rgba(var(--color-theme),0.05)' + ]]] + icon: + - color: | + [[[ + return variables.ulm_card_media_player_enable_art && states[entity.entity_id].attributes.entity_picture != null + ? 'white' + : 'rgba(var(--color-theme), 0.9)' + ]]] + hold_action: + action: > + [[[ + return variables.ulm_card_media_player_enable_popup && entity.attributes.source_list ? "fire-dom-event" : "more-info"; + ]]] + browser_mod: + service: "browser_mod.popup" + data: + large: true + hide_header: true + content: + type: "custom:button-card" + template: "popup_media_player_source_card" + entity: "[[[ return entity.entity_id; ]]]" + tap_action: + action: > + [[[ + return variables.ulm_card_media_player_enable_popup && entity.attributes.source_list ? "fire-dom-event" : "more-info"; + ]]] + browser_mod: + service: "browser_mod.popup" + data: + large: true + hide_header: true + content: + type: "custom:button-card" + template: "popup_media_player_source_card" + entity: "[[[ return entity.entity_id; ]]]" item3: card: type: "custom:my-slider" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source_card.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source_card.yaml new file mode 100644 index 000000000..6bd1d0bc2 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source_card.yaml @@ -0,0 +1,18 @@ +--- +popup_media_player_source_card: + template: "popup_media_player_source" + custom_fields: + footer: + card: + type: "custom:button-card" + template: "popup_list_items" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "popup_button_back" + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.close_popup" + data: {} From 4b0ccd11dc226d7e7e3f7b44af63085a560c8dea Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:50:37 +0200 Subject: [PATCH 06/26] documentation --- docs/usage/cards/card_media_player.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/usage/cards/card_media_player.md b/docs/usage/cards/card_media_player.md index 25230a8e5..452f22b57 100644 --- a/docs/usage/cards/card_media_player.md +++ b/docs/usage/cards/card_media_player.md @@ -25,12 +25,13 @@ hide: | 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 | -| ulm_card_media_player_enable_controls | false | | Enable controls below the title | -| ulm_card_media_player_enable_volume_slider | false | | Enable volume slider below controls | +| ulm_card_media_player_enable_controls | false | | Enable controls below the title | +| ulm_card_media_player_enable_volume_slider | false | | Enable volume slider below controls | | ulm_card_media_player_collapsible | false | | Controls are collapsible when state is off | | ulm_card_media_player_player_controls_entity | entity | | Change the controlled entity | | ulm_card_media_player_enable_popup | false | | Enable pop-up | | ulm_card_media_player_more_info | false | | Displays artist and album info in the sub-label | +| ulm_card_media_player_power_button | false | | Show power button | !!! note To use `popup_media_player` you need to set the variable `ulm_card_media_player_enable_popup` to `true`. This is a different approach as the other `popup_cards` use. From 107347fa9a675132fce8608debbe959ed7002688 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:19:06 +0200 Subject: [PATCH 07/26] Fix footer overlay for all screen dimensions --- .../popups/popup_media_player_infos.yaml | 1 + .../popups/popup_media_player_source.yaml | 20 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index 8e6390077..f6ec13f08 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -33,6 +33,7 @@ popup_media_player_infos: footer: - align-self: "start" - padding-bottom: "2%" + - padding-top: "12px" extra_styles: | @media (max-width: 800px) { #container { diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml index 99b25d050..ea37e4827 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml @@ -5,26 +5,24 @@ popup_media_player_source: grid: - grid-template-areas: "'header' 'content3' 'footer'" - grid-template-columns: "1fr" - - grid-template-rows: "16vh max-content 14vh" + - grid-template-rows: "16vh 56vh 14vh" - column-gap: "0px" custom_fields: footer: - - display: "flex" - - justify-self: "center" - - justify-content: "center" + - align-self: "absolute" + - margin-top: "12px" - z-index: "1000" - - position: "fixed" - - bottom: "2.2%" - - background-color: "var(--primary-background-color)" - - min-width: "42vh" content1: - display: "none" content2: - display: "none" content3: - - display: "block" + - display: "grid" + - overflow: "auto" - justify-self: "center" - align-self: "start" + - max-height: "56vh" + - padding-bottom: "12px" extra_styles: | @media (max-width: 800px) { #container { @@ -38,10 +36,6 @@ popup_media_player_source: #content2 { display: none; } - #footer { - bottom: 0 !important; - padding-bottom: 6.2% !important; - } custom_fields: footer: card: From 96f4ab5ea5b58a081222c5a4d66b087e7e1eb8d3 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:07:15 +0200 Subject: [PATCH 08/26] Fix popup if no source_list --- .../card_templates/cards/card_media_player.yaml | 5 +++-- .../popup_templates/popup_buttons/popup_button_source.yaml | 5 ++++- .../popup_templates/popups/popup_media_player_infos.yaml | 4 ++-- .../popup_templates/popups/popup_media_player_source.yaml | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml index 48dbd37b5..5fab1e331 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml @@ -397,6 +397,7 @@ card_media_player: type: "custom:button-card" template: "widget_icon" icon: "mdi:playlist-music" + entity: "[[[ return entity.entity_id; ]]]" styles: card: - background-color: | @@ -415,7 +416,7 @@ card_media_player: hold_action: action: > [[[ - return variables.ulm_card_media_player_enable_popup && entity.attributes.source_list ? "fire-dom-event" : "more-info"; + return variables.ulm_card_media_player_enable_popup && entity.attributes?.source_list ? "fire-dom-event" : "more-info"; ]]] browser_mod: service: "browser_mod.popup" @@ -429,7 +430,7 @@ card_media_player: tap_action: action: > [[[ - return variables.ulm_card_media_player_enable_popup && entity.attributes.source_list ? "fire-dom-event" : "more-info"; + return variables.ulm_card_media_player_enable_popup && entity.attributes?.source_list ? "fire-dom-event" : "more-info"; ]]] browser_mod: service: "browser_mod.popup" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml index fd5b66823..9e842ac58 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml @@ -14,7 +14,10 @@ popup_button_source: - box-shadow: "none" - border: "1px solid rgba(var(--color-theme),0.25)" tap_action: - action: "fire-dom-event" + action: > + [[[ + return entity.attributes?.source_list ? "fire-dom-event" : "more-info"; + ]]] browser_mod: service: "browser_mod.popup" data: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index f6ec13f08..e342eb87e 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -321,9 +321,9 @@ popup_media_player_infos: return row; } - let source_list = entity.attributes.source_list; + let source_list = entity.attributes?.source_list; - let length_list = source_list.length + let length_list = source_list?.length let index = 0; for (let source in source_list){ rows.push(generate_source_items(index)); diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml index ea37e4827..49038ff78 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml @@ -11,18 +11,18 @@ popup_media_player_source: footer: - align-self: "absolute" - margin-top: "12px" - - z-index: "1000" content1: - display: "none" content2: - display: "none" content3: - display: "grid" - - overflow: "auto" + - overflow-x: "hidden" - justify-self: "center" - align-self: "start" - max-height: "56vh" - padding-bottom: "12px" + - max-width: "42vh" extra_styles: | @media (max-width: 800px) { #container { @@ -82,7 +82,7 @@ popup_media_player_source: card: type: "custom:button-card" template: "popup_button_volume" - icon: + icon: "mdi:volume-high" entity: "[[[ return entity.entity_id; ]]]" tap_action: action: "fire-dom-event" From cfa6941ad79f672896788a718723c5c58588c007 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:18:11 +0200 Subject: [PATCH 09/26] Final tweaks --- .../cards/card_media_player.yaml | 18 ++++++++++++++++++ .../popups/popup_media_player_infos.yaml | 1 - .../popups/popup_media_player_volume.yaml | 10 +++++----- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml index 5fab1e331..c711c8711 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml @@ -437,6 +437,24 @@ card_media_player: data: large: true hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-max-width: auto + --popup-min-width: 800px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } content: type: "custom:button-card" template: "popup_media_player_source_card" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index e342eb87e..78288bee3 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -15,7 +15,6 @@ popup_media_player_infos: - box-shadow: "none" - padding: "0% 2% 2% 2%" - border-radius: "none" - - min-height: "80vh" custom_fields: header: - align-self: "start" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml index 8f970230c..8bf8a986b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_volume.yaml @@ -4,19 +4,20 @@ popup_media_player_volume: styles: grid: - grid-template-areas: "'header' 'content2' 'footer'" - - grid-template-rows: "16vh 52vh 28vh;" + - grid-template-rows: "16vh 56vh 14vh;" - grid-template-columns: "1fr" custom_fields: content1: - display: "none" content2: - - display: "block" + - display: "grid" - align-self: "start" + - height: "56vh" extra_styles: | @media (max-width: 800px) { #container { grid-template-areas: "header" "content2" "footer" !important; - grid-template-rows: 16vh 56vh 28vh !important; + grid-template-rows: 16vh 56vh 14vh !important; grid-template-columns: 1fr !important; } #content1 { @@ -46,8 +47,7 @@ popup_media_player_volume: --popup-border-radius: 20px; --popup-padding-x: 24px; --popup-padding-y: 20px; - --popup-max-width: auto - --popup-min-width: 800px; + --popup-min-width: 1000px; card_mod: style: ha-dialog$: | From 9846566528c4634ef34f9b11eb1466bf47e36196 Mon Sep 17 00:00:00 2001 From: freddanastrom Date: Tue, 11 Oct 2022 15:33:56 +0200 Subject: [PATCH 10/26] Update card_person.yaml Excluding passive zones and making the persons attribute in zones optional, since it breaks the card if the attribute for some reason is missing. --- .../ulm_templates/card_templates/cards/card_person.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml index 983a4c882..44c240b82 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml @@ -74,7 +74,7 @@ card_person: } else { for (let st in states) { if (st.startsWith("zone.")) { - if (states[st]?.attributes?.persons.includes(variables.ulm_card_person_entity)) { + if (states[st]?.attributes?.persons?.includes(variables.ulm_card_person_entity) && !states[st]?.attributes?.passive) { var icon = states[st].attributes.icon !== null ? states[st].attributes.icon : 'mdi:help-circle'; return ''; } From 75090cdb3bf0816f629b961ded358b02a6e92ffb Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 14 Oct 2022 22:37:23 +0200 Subject: [PATCH 11/26] Add effect and option lists --- .../lovelace/translations/default.yaml | 1 + .../card_templates/cards/card_light.yaml | 7 +- .../popup_button_light_more_options.yaml | 53 ++++ .../popup_layouts/popup_light_effect_row.yaml | 41 +++ .../popup_light_palette_row.yaml | 41 +++ .../popups/popup_light_brightness.yaml | 99 ++++++- .../popups/popup_light_effect.yaml | 251 ++++++++++++++++++ .../popups/popup_light_palette.yaml | 128 +++++++++ 8 files changed, 617 insertions(+), 4 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_light_more_options.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_palette.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml index f201de847..26fbf221f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml @@ -11,6 +11,7 @@ ulm_translation_engine: ulm_translation_close_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.close_cover']; ]]]" ulm_translation_stop_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.stop_cover']; ]]]" ulm_translation_open_cover: "[[[ return hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.open_cover']; ]]]" + ulm_translation_more_options: "[[[ return hass.resources[hass['language']]['ui.panel.lovelace.editor.edit_card.options']; ]]]" 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/cards/card_light.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml index 3a3db1e2d..198e831cd 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml @@ -17,6 +17,7 @@ card_light: ulm_card_light_force_background_color: false ulm_card_light_enable_popup: false ulm_card_light_enable_popup_tap: false + ulm_card_light_color_palette: "" show_icon: false show_name: false show_label: false @@ -108,7 +109,8 @@ card_light: let vars = variables; if(variables.ulm_card_light_enable_popup) { vars.ulm_custom_popup = { - 'template': 'popup_light_brightness' + 'template': 'popup_light_brightness', + 'popup_variables': {'ulm_card_light_color_palette': variables.ulm_card_light_color_palette } }; } return vars; @@ -151,7 +153,8 @@ card_light: let vars = variables; if(variables.ulm_card_light_enable_popup) { vars.ulm_custom_popup = { - 'template': 'popup_light_brightness' + 'template': 'popup_light_brightness', + 'popup_variables': {'ulm_card_light_color_palette': variables.ulm_card_light_color_palette } }; } return vars; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_light_more_options.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_light_more_options.yaml new file mode 100644 index 000000000..8f799ddc5 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_light_more_options.yaml @@ -0,0 +1,53 @@ +--- +popup_button_light_more_options: + template: + - "popup_button" + - "ulm_translation_engine" + name: "[[[ return variables.ulm_translation_more_options; ]]]" + icon: "mdi:dots-horizontal-circle-outline" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-max-width: auto + --popup-min-width: 800px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: > + [[[ + if(entity.attributes?.effect_list){ + return 'popup_light_effect' + } + if(variables?.ulm_card_light_color_palette){ + return 'popup_light_palette' + } + ]]] + entity: "[[[ return entity.entity_id; ]]]" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml new file mode 100644 index 000000000..220e35e71 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml @@ -0,0 +1,41 @@ +--- +popup_light_effect_row: + show_icon: false + show_name: true + show_label: false + extra_styles: | + ha-card:hover { + background-color: var(--primary-background-color); + } + styles: + grid: + - grid-template-areas: "n" + card: + - padding: "2px 0px" + - height: "42px" + - border-radius: "10px" + - width: "40vh" + name: + - align-self: "center" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - margin-right: "12px" + name: > + [[[ + var name = entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; + return name; + ]]] + state: + - operator: "template" + value: "[[[ return entity.attributes.effect == entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; ]]]" + styles: + card: + - background-color: "rgba(var(--color-theme),0.2)" + tap_action: + action: "call-service" + service: "light.turn_on" + service_data: + entity_id: "[[[ return entity.entity_id; ]]]" + effect: "[[[ return entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml new file mode 100644 index 000000000..27ea51373 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml @@ -0,0 +1,41 @@ +--- +popup_light_palette_row: + show_icon: false + show_name: true + show_label: false + extra_styles: | + ha-card:hover { + background-color: var(--primary-background-color); + } + styles: + grid: + - grid-template-areas: "n" + card: + - padding: "2px 0px" + - height: "42px" + - border-radius: "10px" + - width: "40vh" + name: + - align-self: "center" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - margin-right: "12px" + name: > + [[[ + var name = entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; + return name; + ]]] + state: + - operator: "template" + value: "[[[ return entity.state == entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; ]]]" + styles: + card: + - background-color: "rgba(var(--color-theme),0.2)" + tap_action: + action: "call-service" + service: "select.select_option" + service_data: + entity_id: "[[[ return entity.entity_id; ]]]" + option: "[[[ return entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml index b3c1f9786..7406edc52 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml @@ -79,6 +79,10 @@ popup_light_brightness: } return "none"; ]]] + content4: + - display: "none" + content5: + - display: "none" buttons: - display: "none" footer: @@ -93,7 +97,7 @@ popup_light_brightness: } #buttons { display: block !important; - align-self: start !important; + align-self: center !important; } #content2 { display: none !important; @@ -101,6 +105,11 @@ popup_light_brightness: #content3 { display: none !important; } + #content4 { + display: none !important; + } + #content5 { + display: none !important; } custom_fields: header: @@ -365,7 +374,21 @@ popup_light_brightness: footer: card: type: "custom:button-card" - template: "popup_list_items" + template: > + [[[ + if(entity.attributes?.effect_list || variables?.ulm_card_light_color_palette){ + return 'list_3_items'; + } + return 'popup_list_items' + ]]] + styles: + grid: + - align-items: "initial" + card: + - background: "none" + custom_fields: + item3: + - display: "[[[return (entity.attributes?.effect_list || variables?.ulm_card_light_color_palette) ? 'block' : 'none' ]]]" custom_fields: item1: card: @@ -376,6 +399,13 @@ popup_light_brightness: type: "custom:button-card" template: "popup_button_power" entity: "[[[ return entity.entity_id ]]]" + item3: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + template: "popup_button_light_more_options" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" content3: card: type: "custom:light-entity-card" @@ -396,3 +426,68 @@ popup_light_brightness: box-shadow: none !important; padding: 10px 0 10px 0 !important; } + content4: + card: + type: "vertical-stack" + cards: > + [[[ + let rows = []; + function generate_effect_items(index) { + var row = { + 'type': 'custom:button-card', + 'template': 'popup_light_effect_row', + 'entity': entity.entity_id, + 'variables': { + 'ulm_popup_light_effect_entity_idx': index + } + }; + return row; + } + + let effect_list = entity.attributes?.effect_list; + + let length_list = effect_list?.length + let index = 0; + for (let effect in effect_list){ + rows.push(generate_effect_items(index)); + index++ + + if(index >= length_list){ + break; + } + } + return rows; + ]]] + content5: + card: + type: "vertical-stack" + cards: > + [[[ + let rows = []; + + function generate_option_items(index) { + var row = { + 'type': 'custom:button-card', + 'template': 'popup_light_palette_row', + 'entity': variables?.ulm_card_light_color_palette, + 'variables': { + 'ulm_popup_light_palette_entity_idx': index + } + }; + return row; + } + + let option_list = states[variables?.ulm_card_light_color_palette]?.attributes?.options; + + let length_list = option_list?.length + let index = 0; + for (let option in option_list){ + rows.push(generate_option_items(index)); + index++ + + if(index >= length_list){ + break; + } + } + return rows; + ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml new file mode 100644 index 000000000..1f04dc375 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml @@ -0,0 +1,251 @@ +--- +popup_light_effect: + template: "popup_light_brightness" + styles: + grid: + - grid-template-areas: > + [[[ + if(entity.attributes?.effect_list && variables?.ulm_card_light_color_palette){ + return "'header header' 'title_effect title_palette' 'content4 content5' 'footer footer'" + } + if(entity.attributes?.effect_list){ + return "'header' 'content4' 'footer'" + } + return "'header' 'content5' 'footer'" + ]]] + - grid-template-columns: > + [[[ + if(entity.attributes?.effect_list && variables?.ulm_card_light_color_palette){ + return '1fr 1fr' + } + return '1fr' + ]]] + - grid-template-rows: > + [[[ + if(entity.attributes?.effect_list && variables?.ulm_card_light_color_palette){ + return "16vh min-content calc(56vh - 54px) 14vh" + } + return "16vh 56vh 14vh" + ]]] + - column-gap: "30px" + custom_fields: + content1: + - display: "none" + content2: + - display: "none" + content3: + - display: "none" + content4: + - display: > + [[[ + if(entity.attributes?.effect_list){ + return 'grid' + } + return 'none' + ]]] + - overflow-x: "hidden" + - justify-self: "center" + - align-self: "start" + - height: "[[[ return (entity.attributes?.effect_list && variables?.ulm_card_light_color_palette)? 'calc(56vh - 54px)' : '56vh' ]]]" + - padding-bottom: "12px" + - max-width: "42vh" + content5: + - display: > + [[[ + if(variables?.ulm_card_light_color_palette){ + return 'grid' + } + return 'none' + ]]] + - overflow-x: "hidden" + - justify-self: "center" + - align-self: "start" + - height: "[[[ return (entity.attributes?.effect_list && variables?.ulm_card_light_color_palette)? 'calc(56vh - 54px)' : '56vh' ]]]" + - padding-bottom: "12px" + - max-width: "42vh" + title_effect: + - display: > + [[[ + if(entity.attributes?.effect_list && variables?.ulm_card_light_color_palette){ + return 'block' + } + return 'none' + ]]] + title_palette: + - display: > + [[[ + if(entity.attributes?.effect_list && variables?.ulm_card_light_color_palette){ + return 'block' + } + return 'none' + ]]] + extra_styles: | + @media (max-width: 800px) { + #container { + grid-template-areas: "header" "content4" "buttons" "footer" !important; + grid-template-rows: 16vh 52vh 14vh 14vh !important; + grid-template-columns: 1fr !important; + } + #buttons { + display: block !important; + align-self: center !important; + } + #content1 { + display: none; + } + #content2 { + display: none; + } + #content3 { + display: none; + } + #content4 { + height: 52vh !important; + } + #content5 { + display: none !important; + } + #title_effect { + display: none !important; + } + #title_palette { + display: none !important; + } + custom_fields: + footer: + card: + type: "custom:button-card" + template: "popup_list_items" + styles: + custom_fields: + item3: + - display: "none" + buttons: + card: + type: "custom:button-card" + template: "list_3_items" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" + styles: + card: + - margin-left: "6px" + custom_fields: + item3: + - display: "none" + grid: + - align-items: "initial" + - grid-template-areas: > + [[[ + var areas = []; + if (entity.attributes.effect_list){ + areas.push("item1"); + } + if (variables?.ulm_card_light_color_palette) { + areas.push("item2"); + } + return "\"" + areas.join(" ") + "\""; + ]]] + - grid-template-columns: > + [[[ + var columns = []; + if (entity.attributes.effect_list) { + columns.push("1fr"); + } + if (variables?.ulm_card_light_color_palette) { + columns.push("1fr"); + } + return columns.join(" "); + ]]] + custom_fields: + item1: + card: + type: "custom:button-card" + template: + - "popup_button" + - "popup_button_selected" + icon: "mdi:auto-fix" + name: "[[[ return hass.resources[hass['language']]['ui.card.light.effect']; ]]]" + item2: + card: + icon: "mdi:palette" + type: "custom:button-card" + template: + - "popup_button" + - "popup_button_color" + styles: + card: + - display: > + [[[; + if (variables?.ulm_card_light_color_palette) { + return "block"; + } + return "none"; + ]]] + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-max-width: auto + --popup-min-width: 800px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: "popup_light_palette" + entity: "[[[ return entity.entity_id; ]]]" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" + title_effect: + card: + type: "custom:button-card" + template: + - "icon_info" + entity: "[[[ return entity.entity_id; ]]]" + icon: "mdi:auto-fix" + name: "[[[ return hass.resources[hass['language']]['ui.card.light.effect']; ]]]" + label: "[[[ return 'total: ' + entity?.attributes?.effect_list?.length ]]]" + styles: + card: + - padding-bottom: "12px" + - background: "none" + img_cell: + - background: "var(--card-background-color)" + icon: + - color: "var(--primary-text-color)" + custom_fields: + title_palette: + card: + type: "custom:button-card" + template: + - "icon_info" + - "ulm_language_variables" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" + icon: "mdi:palette" + name: "[[[ return variables?.ulm_popups_color; ]]]" + label: "[[[ return 'total: ' + states[variables?.ulm_card_light_color_palette]?.attributes?.options?.length ]]]" + styles: + card: + - padding-bottom: "12px" + - background: "none" + img_cell: + - background: "var(--card-background-color)" + icon: + - color: "var(--primary-text-color)" + custom_fields: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_palette.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_palette.yaml new file mode 100644 index 000000000..05bd034f1 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_palette.yaml @@ -0,0 +1,128 @@ +--- +popup_light_palette: + template: "popup_light_effect" + extra_styles: | + @media (max-width: 800px) { + #container { + grid-template-areas: "header" "content5" "buttons" "footer" !important; + grid-template-rows: 16vh 52vh 14vh 14vh !important; + grid-template-columns: 1fr !important; + } + #buttons { + display: block !important; + align-self: center !important; + } + #content1 { + display: none; + } + #content2 { + display: none; + } + #content3 { + display: none; + } + #content4 { + display: none !important; + } + #content5 { + height: 52vh !important; + } + #title_effect { + display: none !important; + } + #title_palette { + display: none !important; + } + custom_fields: + buttons: + card: + type: "custom:button-card" + template: "list_3_items" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" + styles: + custom_fields: + item3: + - display: "none" + grid: + - align-items: "initial" + - grid-template-areas: > + [[[ + var areas = []; + if (entity.attributes.effect_list){ + areas.push("item1"); + } + if (variables?.ulm_card_light_color_palette) { + areas.push("item2"); + } + return "\"" + areas.join(" ") + "\""; + ]]] + - grid-template-columns: > + [[[ + var columns = []; + if (entity.attributes.effect_list) { + columns.push("1fr"); + } + if (variables?.ulm_card_light_color_palette) { + columns.push("1fr"); + } + return columns.join(" "); + ]]] + custom_fields: + item1: + card: + type: "custom:button-card" + template: + - "popup_button" + icon: "mdi:auto-fix" + name: "[[[ return hass.resources[hass['language']]['ui.card.light.effect']; ]]]" + styles: + card: + - display: > + [[[; + if (entity.attributes?.effect_list) { + return "block"; + } + return "none"; + ]]] + tap_action: + action: "fire-dom-event" + browser_mod: + service: "browser_mod.popup" + data: + hide_header: true + style: | + --popup-background-color: var(--primary-background-color); + --popup-border-radius: 20px; + --popup-padding-x: 24px; + --popup-padding-y: 20px; + --popup-max-width: auto + --popup-min-width: 800px; + card_mod: + style: + ha-dialog$: | + @media (max-width: 800px){ + div.mdc-dialog__container { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --ha-dialog-border-radius: 0px; + } + } + content: + type: "custom:button-card" + template: "popup_light_effect" + entity: "[[[ return entity.entity_id; ]]]" + variables: + ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" + item2: + card: + icon: "mdi:palette" + type: "custom:button-card" + template: + - "popup_button" + - "popup_button_color" + - "popup_button_selected" + styles: + card: + - display: "block" From f01e58da564866e870cce0dc417181023b7b7f7a Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:58:54 +0200 Subject: [PATCH 12/26] Media_player selector styling --- .../popup_layouts/popup_media_player_row.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml index 88b64b6ad..6df6fce21 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml @@ -11,17 +11,18 @@ popup_media_player_row: grid: - grid-template-areas: "n" card: - - padding: "2px 0px" + - padding: "2px 12px" - height: "42px" - - border-radius: "10px" + - background: "none" + - border: "1px rgba(var(--color-theme),0.2) solid" - width: "40vh" name: - align-self: "center" - - justify-self: "start" + - justify-self: "center" - font-weight: "bold" - font-size: "14px" - - margin-left: "12px" - - margin-right: "12px" + - text-transform: "capitalize" + - color: "rgba(var(--color-theme),0.5)" name: > [[[ var name = entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; @@ -32,7 +33,10 @@ popup_media_player_row: value: "[[[ return entity.attributes.source == entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; ]]]" styles: card: - - background-color: "rgba(var(--color-theme),0.2)" + - background-color: "rgba(var(--color-blue),0.1)" + - border: "none" + name: + - color: "rgba(var(--color-blue),1)" tap_action: action: "call-service" service: "media_player.select_source" From fc8307e2eaa3f1b0576e3b0f6bce8ea0fcff4898 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:10:39 +0200 Subject: [PATCH 13/26] Styling for popus --- .../popup_layouts/popup_light_effect_row.yaml | 23 +---------------- .../popup_light_palette_row.yaml | 23 +---------------- .../popup_layouts/popup_media_player_row.yaml | 24 +----------------- .../popup_layouts/popup_row_layout.yaml | 25 +++++++++++++++++++ .../popups/popup_media_player_source.yaml | 4 +-- 5 files changed, 30 insertions(+), 69 deletions(-) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_row_layout.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml index 220e35e71..120e9c29c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml @@ -1,27 +1,6 @@ --- popup_light_effect_row: - show_icon: false - show_name: true - show_label: false - extra_styles: | - ha-card:hover { - background-color: var(--primary-background-color); - } - styles: - grid: - - grid-template-areas: "n" - card: - - padding: "2px 0px" - - height: "42px" - - border-radius: "10px" - - width: "40vh" - name: - - align-self: "center" - - justify-self: "start" - - font-weight: "bold" - - font-size: "14px" - - margin-left: "12px" - - margin-right: "12px" + template: "popup_row_layout" name: > [[[ var name = entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml index 27ea51373..5dbc59f23 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml @@ -1,27 +1,6 @@ --- popup_light_palette_row: - show_icon: false - show_name: true - show_label: false - extra_styles: | - ha-card:hover { - background-color: var(--primary-background-color); - } - styles: - grid: - - grid-template-areas: "n" - card: - - padding: "2px 0px" - - height: "42px" - - border-radius: "10px" - - width: "40vh" - name: - - align-self: "center" - - justify-self: "start" - - font-weight: "bold" - - font-size: "14px" - - margin-left: "12px" - - margin-right: "12px" + template: "popup_row_layout" name: > [[[ var name = entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml index 6df6fce21..3b1f4f478 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_media_player_row.yaml @@ -1,28 +1,6 @@ --- popup_media_player_row: - show_icon: false - show_name: true - show_label: false - extra_styles: | - ha-card:hover { - background-color: var(--primary-background-color); - } - styles: - grid: - - grid-template-areas: "n" - card: - - padding: "2px 12px" - - height: "42px" - - background: "none" - - border: "1px rgba(var(--color-theme),0.2) solid" - - width: "40vh" - name: - - align-self: "center" - - justify-self: "center" - - font-weight: "bold" - - font-size: "14px" - - text-transform: "capitalize" - - color: "rgba(var(--color-theme),0.5)" + template: "popup_row_layout" name: > [[[ var name = entity.attributes.source_list[variables.ulm_popup_media_entity_idx]; diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_row_layout.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_row_layout.yaml new file mode 100644 index 000000000..d111d3a94 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_row_layout.yaml @@ -0,0 +1,25 @@ +--- +popup_row_layout: + show_icon: false + show_name: true + show_label: false + extra_styles: | + ha-card:hover { + background-color: var(--primary-background-color); + } + styles: + grid: + - grid-template-areas: "n" + card: + - padding: "2px 12px" + - height: "42px" + - background: "none" + - border: "1px rgba(var(--color-theme),0.2) solid" + - width: "40vh" + name: + - align-self: "center" + - justify-self: "center" + - font-weight: "bold" + - font-size: "14px" + - text-transform: "capitalize" + - color: "rgba(var(--color-theme),0.5)" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml index 49038ff78..7d894be58 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_source.yaml @@ -20,14 +20,14 @@ popup_media_player_source: - overflow-x: "hidden" - justify-self: "center" - align-self: "start" - - max-height: "56vh" + - height: "56vh" - padding-bottom: "12px" - max-width: "42vh" extra_styles: | @media (max-width: 800px) { #container { grid-template-areas: "header" "content3" "footer" !important; - grid-template-rows: 16vh max-content 14vh !important; + grid-template-rows: 16vh 56vh 14vh !important; grid-template-columns: 1fr !important; } #content1 { From 49341db52a65b21064524e7683f02c4743290904 Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:10:47 +0200 Subject: [PATCH 14/26] Initial version --- .../cards/card_weather_ulm.yaml | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml new file mode 100644 index 000000000..02560ff34 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml @@ -0,0 +1,203 @@ +card_weather_ulm: + template: + - "icon_more_info_new" + - "ulm_translation_engine" + variables: + ulm_card_weather_ulm_enable_popup: false + ulm_weather_popup_surpress_first_forecast: false + show_icon: false + show_name: false + show_label: false + styles: + grid: + - grid-template-areas: "'item1' 'item2'" + - grid-template-columns: "1fr" + - grid-template-rows: "1fr 1fr" + - row-gap: "12px" + card: + - border-radius: "var(--border-radius)" + - box-shadow: "var(--box-shadow)" + - padding: "12px" + custom_fields: + item1: + card: + type: "custom:button-card" + custom_fields: + item1: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + icon: | + [[[ + var state = entity.state; + var icon = { + "clear-night": "mdi:weather-night", + "cloudy": "mdi:weather-cloudy", + "exceptional": "mdi:weather-sunny-alert", + "fog": "mdi:weather-fog", + "hail": "mdi:weather-hail", + "lightning": "mdi:weather-lightning", + "lightning-rainy": "mdi:weather-lightning-rainy", + "partlycloudy": "mdi:weather-partly-cloudy", + "pouring": "mdi:weather-pouring", + "rainy": "mdi:weather-rainy", + "snowy": "mdi:weather-snowy", + "snowy-rainy": "mdi:weather-snowy-rainy", + "sunny": "mdi:weather-sunny", + "windy": "mdi:weather-windy", + "default": "mdi:crosshairs-question" + } + return (icon[state] || icon["default"]); + ]]] + variables: > + [[[ + let vars = variables; + + if(variables.ulm_card_weather_ulm_enable_popup) { + vars.ulm_custom_popup = { + 'template': 'popup_weather_forecast', + 'popup_variables': {'ulm_weather_popup_surpress_first_forecast': variables.ulm_weather_popup_surpress_first_forecast} + }; + } + return vars; + ]]] + styles: + icon: + - color: > + [[[ + var state = entity.state; + var icon = { + "clear-night": "rgba(var(--color-yellow),1)", + "cloudy": "rgba(var(--color-blue),1)", + "exceptional": "rgba(var(--color-red),1)", + "fog": "rgba(var(--color-grey),1)", + "hail": "rgba(var(--color-blue),1)", + "lightning": "rgba(var(--color-blue),1)", + "lightning-rainy": "rgba(var(--color-blue),1)", + "partlycloudy": "rgba(var(--color-yellow),1)", + "pouring": "rgba(var(--color-grey),1)", + "rainy": "rgba(var(--color-blue),1)", + "snowy": "rgba(var(--color-blue),1)", + "snowy-rainy": "rgba(var(--color-blue),1)", + "sunny": "rgba(var(--color-yellow),1)", + "windy": "rgba(var(--color-grey),1)", + "default": "rgba(var(--color-grey),1)", + } + return (icon[state] || icon["default"]); + ]]] + img_cell: + - background-color: > + [[[ + var state = entity.state; + var icon = { + "clear-night": "rgba(var(--color-yellow),0.2)", + "cloudy": "rgba(var(--color-blue),0.2)", + "exceptional": "rgba(var(--color-red),0.2)", + "fog": "rgba(var(--color-grey),0.2)", + "hail": "rgba(var(--color-blue),0.2)", + "lightning": "rgba(var(--color-blue),0.2)", + "lightning-rainy": "rgba(var(--color-blue),0.2)", + "partlycloudy": "rgba(var(--color-yellow),0.2)", + "pouring": "rgba(var(--color-grey),0.2)", + "rainy": "rgba(var(--color-blue),0.2)", + "snowy": "rgba(var(--color-blue),0.2)", + "snowy-rainy": "rgba(var(--color-blue),0.2)", + "sunny": "rgba(var(--color-yellow),0.2)", + "windy": "rgba(var(--color-grey),0.2)", + "default": "rgba(var(--color-grey),0.2)", + } + return (icon[state] || icon["default"]); + ]]] + item2: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + show_state: true + styles: + grid: + - grid-template-areas: "'i n' 'i s'" + variables: > + [[[ + let vars = variables; + + if(variables.ulm_card_weather_ulm_enable_popup) { + vars.ulm_custom_popup = { + 'template': 'popup_weather_forecast', + 'popup_variables': {'ulm_weather_popup_surpress_first_forecast': variables.ulm_weather_popup_surpress_first_forecast} + }; + } + return vars; + ]]] + item2: + card: + type: "custom:button-card" + template: "list_2_items" + custom_fields: + item1: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + icon: "mdi:water" + tap_action: + action: "none" + layout: "icon_state" + show_state: false + show_units: false + show_name: false + custom_fields: + val: "[[[ return entity.attributes.humidity + '%' ]]]" + styles: + grid: + - grid-template-areas: "'i val'" + - grid-template-columns: "40% 60%" + card: + - box-shadow: "none" + - padding: "0px" + - background-color: "rgba(var(--color-theme),0.05)" + - border-radius: "14px" + - place-self: "center" + - height: "42px" + icon: + - color: "rgba(var(--color-theme),0.9)" + img_cell: + - justify-content: "right" + custom_fields: + val: + - text-align: "left" + - font-size: 1rem + size: "20px" + color: "var(--google-grey)" + item2: + card: + type: "custom:button-card" + entity: "[[[ return entity.entity_id ]]]" + icon: "mdi:thermometer" + tap_action: + action: "none" + layout: "icon_state" + show_state: false + show_units: false + show_name: false + custom_fields: + val: "[[[ return entity.attributes.temperature + entity.attributes.temperature_unit ]]]" + styles: + grid: + - grid-template-areas: "'i val'" + - grid-template-columns: "45% 55%" + card: + - box-shadow: "none" + - padding: "0px" + - background-color: "rgba(var(--color-theme),0.05)" + - border-radius: "14px" + - place-self: "center" + - height: "42px" + icon: + - color: "rgba(var(--color-theme),0.9)" + img_cell: + - justify-content: "right" + custom_fields: + val: + - text-align: "left" + - font-size: 1rem + size: "20px" + color: "var(--google-grey)" From 35910d15d2f71e42885fc4e5c980a813084188ce Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:12:40 +0200 Subject: [PATCH 15/26] State based styling --- .../popup_layouts/popup_light_effect_row.yaml | 5 ++++- .../popup_layouts/popup_light_palette_row.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml index 120e9c29c..0df7de110 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_effect_row.yaml @@ -11,7 +11,10 @@ popup_light_effect_row: value: "[[[ return entity.attributes.effect == entity.attributes.effect_list[variables.ulm_popup_light_effect_entity_idx]; ]]]" styles: card: - - background-color: "rgba(var(--color-theme),0.2)" + - background-color: "rgba(var(--color-blue),0.1)" + - border: "none" + name: + - color: "rgba(var(--color-blue),1)" tap_action: action: "call-service" service: "light.turn_on" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml index 5dbc59f23..ca4f4cbde 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_light_palette_row.yaml @@ -11,7 +11,10 @@ popup_light_palette_row: value: "[[[ return entity.state == entity.attributes.options[variables.ulm_popup_light_palette_entity_idx]; ]]]" styles: card: - - background-color: "rgba(var(--color-theme),0.2)" + - background-color: "rgba(var(--color-blue),0.1)" + - border: "none" + name: + - color: "rgba(var(--color-blue),1)" tap_action: action: "call-service" service: "select.select_option" From 43fe609de4ca04d0b6530538dfda0002785545f0 Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:18:06 +0200 Subject: [PATCH 16/26] Initial version --- .../assets/img/ulm_cards/card_weather_ulm.png | Bin 0 -> 7353 bytes docs/usage/cards/card_weather_ulm.md | 36 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/assets/img/ulm_cards/card_weather_ulm.png create mode 100644 docs/usage/cards/card_weather_ulm.md diff --git a/docs/assets/img/ulm_cards/card_weather_ulm.png b/docs/assets/img/ulm_cards/card_weather_ulm.png new file mode 100644 index 0000000000000000000000000000000000000000..5964e0515bbb1ec4f4f484c13515e65ee106b8c8 GIT binary patch literal 7353 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 literal 0 HcmV?d00001 diff --git a/docs/usage/cards/card_weather_ulm.md b/docs/usage/cards/card_weather_ulm.md new file mode 100644 index 000000000..1a0a0bbbb --- /dev/null +++ b/docs/usage/cards/card_weather_ulm.md @@ -0,0 +1,36 @@ +--- +title: Weather Card ULM +hide: + - toc +--- + + + +## Description + +![example-image](../../assets/img/ulm_cards/card_weather_ulm.png){ width="500" } + +This is a card to show your weather without usage of custom ressources. + +## Variables + +| Variable | Default | Required | Notes | +| ----------------------------------- | -------- | ---------------- | ------------------------------------- | +| entity | | :material-check: | your weather entity | +| ulm_card_weather_ulm_enable_popup | `false` | :material-close: | | + +## Usage + +```yaml +- type: "custom:button-card" + template: "card_weather_ulm" + entity: "weather.lieusaint" + variables: + ulm_card_weather_ulm_enable_popup: true +``` + +??? note "Template Code" + + ```yaml title="card_weather.yaml" + --8<-- "custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml" + ``` From be4852629836460e28c2d5b3bb0f3fb84c081ba8 Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:22:30 +0200 Subject: [PATCH 17/26] Fix type --- docs/usage/cards/card_weather_ulm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/cards/card_weather_ulm.md b/docs/usage/cards/card_weather_ulm.md index 1a0a0bbbb..5155a9e06 100644 --- a/docs/usage/cards/card_weather_ulm.md +++ b/docs/usage/cards/card_weather_ulm.md @@ -10,7 +10,7 @@ hide: ![example-image](../../assets/img/ulm_cards/card_weather_ulm.png){ width="500" } -This is a card to show your weather without usage of custom ressources. +This is a card to show your weather without usage of custom resources. ## Variables From 8138a8912a5d9dee907c9395d87565b32348166b Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:26:44 +0200 Subject: [PATCH 18/26] Fix quality check --- .../card_templates/cards/card_weather_ulm.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml index 02560ff34..25a4824b5 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml @@ -1,3 +1,5 @@ +--- +### Card Weather ULM ### card_weather_ulm: template: - "icon_more_info_new" @@ -145,10 +147,10 @@ card_weather_ulm: show_units: false show_name: false custom_fields: - val: "[[[ return entity.attributes.humidity + '%' ]]]" + item: "[[[ return entity.attributes.humidity + '%' ]]]" styles: grid: - - grid-template-areas: "'i val'" + - grid-template-areas: "'i item'" - grid-template-columns: "40% 60%" card: - box-shadow: "none" @@ -162,7 +164,7 @@ card_weather_ulm: img_cell: - justify-content: "right" custom_fields: - val: + item: - text-align: "left" - font-size: 1rem size: "20px" @@ -179,10 +181,10 @@ card_weather_ulm: show_units: false show_name: false custom_fields: - val: "[[[ return entity.attributes.temperature + entity.attributes.temperature_unit ]]]" + item: "[[[ return entity.attributes.temperature + entity.attributes.temperature_unit ]]]" styles: grid: - - grid-template-areas: "'i val'" + - grid-template-areas: "'i item'" - grid-template-columns: "45% 55%" card: - box-shadow: "none" @@ -196,7 +198,7 @@ card_weather_ulm: img_cell: - justify-content: "right" custom_fields: - val: + item: - text-align: "left" - font-size: 1rem size: "20px" From f65a0f0f6b87504373d48c0b2859c720942c5763 Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:34:36 +0200 Subject: [PATCH 19/26] Fix quality --- .../ulm_templates/card_templates/cards/card_weather_ulm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml index 25a4824b5..292a2bfbc 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_weather_ulm.yaml @@ -166,7 +166,7 @@ card_weather_ulm: custom_fields: item: - text-align: "left" - - font-size: 1rem + - font-size: "1rem" size: "20px" color: "var(--google-grey)" item2: @@ -200,6 +200,6 @@ card_weather_ulm: custom_fields: item: - text-align: "left" - - font-size: 1rem + - font-size: "1rem" size: "20px" color: "var(--google-grey)" From 23e1f3e78297ba48ba5710c22f1cbd2f623a4325 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:37:35 +0200 Subject: [PATCH 20/26] Use margin instead of padding --- .../popup_templates/popups/popup_light_effect.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml index 1f04dc375..ebd089514 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml @@ -222,7 +222,7 @@ popup_light_effect: label: "[[[ return 'total: ' + entity?.attributes?.effect_list?.length ]]]" styles: card: - - padding-bottom: "12px" + - margin-bottom: "12px" - background: "none" img_cell: - background: "var(--card-background-color)" @@ -242,7 +242,7 @@ popup_light_effect: label: "[[[ return 'total: ' + states[variables?.ulm_card_light_color_palette]?.attributes?.options?.length ]]]" styles: card: - - padding-bottom: "12px" + - margin-bottom: "12px" - background: "none" img_cell: - background: "var(--card-background-color)" From e3fdba0ca1a49dfe5897b160830fa52357832fd0 Mon Sep 17 00:00:00 2001 From: schumijo Date: Thu, 20 Oct 2022 15:42:10 +0200 Subject: [PATCH 21/26] Fix quality --- docs/usage/cards/card_weather_ulm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/cards/card_weather_ulm.md b/docs/usage/cards/card_weather_ulm.md index 5155a9e06..bc881defa 100644 --- a/docs/usage/cards/card_weather_ulm.md +++ b/docs/usage/cards/card_weather_ulm.md @@ -17,7 +17,7 @@ This is a card to show your weather without usage of custom resources. | Variable | Default | Required | Notes | | ----------------------------------- | -------- | ---------------- | ------------------------------------- | | entity | | :material-check: | your weather entity | -| ulm_card_weather_ulm_enable_popup | `false` | :material-close: | | +| ulm_card_weather_ulm_enable_popup | `false` | :material-close: | | ## Usage From daba12ec7c4c2acf6c256290b3a6a3727367129b Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:57:39 +0200 Subject: [PATCH 22/26] Rename color files Closes #1059 --- .../colors/{violet_no_state.yaml => purple_no_state.yaml} | 0 .../card_templates/colors/{violet_off.yaml => purple_off.yaml} | 0 .../card_templates/colors/{violet_on.yaml => purple_on.yaml} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/{violet_no_state.yaml => purple_no_state.yaml} (100%) rename custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/{violet_off.yaml => purple_off.yaml} (100%) rename custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/{violet_on.yaml => purple_on.yaml} (100%) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_no_state.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_no_state.yaml similarity index 100% rename from custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_no_state.yaml rename to custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_no_state.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_off.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_off.yaml similarity index 100% rename from custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_off.yaml rename to custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_off.yaml diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_on.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_on.yaml similarity index 100% rename from custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/violet_on.yaml rename to custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/colors/purple_on.yaml From 88c332d3e455364b64b9b3aa138f37c7afcd661f Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:10:20 +0200 Subject: [PATCH 23/26] Add template code to docs Closes #967 --- custom_cards/custom_card_imswel_person/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_cards/custom_card_imswel_person/README.md b/custom_cards/custom_card_imswel_person/README.md index 1e3d246bb..2562fa6ae 100644 --- a/custom_cards/custom_card_imswel_person/README.md +++ b/custom_cards/custom_card_imswel_person/README.md @@ -98,3 +98,9 @@ This card needs the following to function correctly: If true, shows the entity picture from your user instead of the icon. Default is false + +??? note "Template Code" + + ```yaml title="custom_card_imswel_person.yaml" + --8<-- "custom_cards/custom_card_imswel_person/custom_card_imswel_person.yaml" + ``` From b2cf4d320ce4b138840da8cdeba8003d68866d82 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:44:43 +0200 Subject: [PATCH 24/26] Translate strings --- .../lovelace/translations/cn.yaml | 1 + .../lovelace/translations/cs.yaml | 1 + .../lovelace/translations/da.yaml | 1 + .../lovelace/translations/de.yaml | 1 + .../lovelace/translations/en.yaml | 1 + .../lovelace/translations/es.yaml | 1 + .../lovelace/translations/fi.yaml | 1 + .../lovelace/translations/fr.yaml | 1 + .../lovelace/translations/it.yaml | 1 + .../lovelace/translations/nl.yaml | 1 + .../lovelace/translations/no.yaml | 1 + .../lovelace/translations/pl.yaml | 1 + .../lovelace/translations/pt-BR.yaml | 1 + .../lovelace/translations/pt.yaml | 1 + .../lovelace/translations/ru.yaml | 1 + .../lovelace/translations/sk.yaml | 1 + .../lovelace/translations/sv.yaml | 1 + .../lovelace/translations/tr.yaml | 1 + .../popup_templates/popups/popup_light_effect.yaml | 13 ++++++------- 19 files changed, 24 insertions(+), 7 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml index 9b3781eb9..713207618 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/cn.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "体积" ulm_popups_color: "顏色" ulm_radar: "雷达" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml index 443813fe2..044e6a0fc 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/cs.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Hlasitost" ulm_popups_color: "Barva" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml index 1f16b71f2..89bd27ab5 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/da.yaml @@ -14,3 +14,4 @@ ulm_language_variables: ulm_volume: "Volumen" ulm_popups_color: "Farve" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml index 84b40122a..3b34ce4fd 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/de.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Lautstärke" ulm_popups_color: "Farbe" ulm_radar: "Radar" + ulm_popup_total: "Gesamt" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml index 93d2c3bfa..8892417c9 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/en.yaml @@ -14,3 +14,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Color" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml index 84ebd9eeb..72e5d063f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml @@ -14,3 +14,4 @@ ulm_language_variables: ulm_volume: "Volumen" ulm_popups_color: "Color" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml index d3f78a6ec..ba720925a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/fi.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Äänenvoimakkuus" ulm_popups_color: "Väri" ulm_radar: "Tutka" + ulm_popup_total: "Yhteensä" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml index 966732ccf..4c7597ba1 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/fr.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Couleur" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml index 89b7327f1..a287730ab 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/it.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Colore" ulm_radar: "Radar" + ulm_popup_total: "Totale" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml index ebd499d7d..0d1694285 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/nl.yaml @@ -14,3 +14,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Kleur" ulm_radar: "Radar" + ulm_popup_total: "Totaal" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml index 47e6451dc..221e31348 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/no.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Farge" ulm_radar: "Radar" + ulm_popup_total: "Totalt" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml index f6b960552..b099c8d01 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pl.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Objętość" ulm_popups_color: "Kolor" ulm_radar: "Radar" + ulm_popup_total: "Total" 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 fc593775b..42b8b89e7 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt-BR.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Cor" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml index a6bb80f45..0dce099b8 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/pt.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Cor" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml index fae2fe72b..61f788e1d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/ru.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Объем" ulm_popups_color: "Цвет" ulm_radar: "Pадар" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml index 1ec4dcf7f..4fe5afdd0 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/sk.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volume" ulm_popups_color: "Farba" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml index 2d93e8fb4..223eb4b48 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/sv.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Volym" ulm_popups_color: "Färg" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml index 25f8c73b6..0dc826481 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/tr.yaml @@ -11,3 +11,4 @@ ulm_language_variables: ulm_volume: "Cilt" ulm_popups_color: "Renk" ulm_radar: "Radar" + ulm_popup_total: "Total" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml index ebd089514..5030f469d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_effect.yaml @@ -1,6 +1,8 @@ --- popup_light_effect: - template: "popup_light_brightness" + template: + - "popup_light_brightness" + - "ulm_language_variables" styles: grid: - grid-template-areas: > @@ -219,7 +221,7 @@ popup_light_effect: entity: "[[[ return entity.entity_id; ]]]" icon: "mdi:auto-fix" name: "[[[ return hass.resources[hass['language']]['ui.card.light.effect']; ]]]" - label: "[[[ return 'total: ' + entity?.attributes?.effect_list?.length ]]]" + label: "[[[ return variables.ulm_popup_total + ': ' + entity?.attributes?.effect_list?.length ]]]" styles: card: - margin-bottom: "12px" @@ -234,12 +236,9 @@ popup_light_effect: type: "custom:button-card" template: - "icon_info" - - "ulm_language_variables" - variables: - ulm_card_light_color_palette: "[[[ return variables?.ulm_card_light_color_palette ]]]" icon: "mdi:palette" - name: "[[[ return variables?.ulm_popups_color; ]]]" - label: "[[[ return 'total: ' + states[variables?.ulm_card_light_color_palette]?.attributes?.options?.length ]]]" + name: "[[[ return variables.ulm_popups_color; ]]]" + label: "[[[ return variables.ulm_popup_total + ': ' + states[variables?.ulm_card_light_color_palette]?.attributes?.options?.length ]]]" styles: card: - margin-bottom: "12px" From 1c83e069712341797cb14be9b500bffefcbf8d7f Mon Sep 17 00:00:00 2001 From: Yllelder Bamir Date: Thu, 27 Oct 2022 10:26:45 +0200 Subject: [PATCH 25/26] Update es.json --- .../translations/es.json | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/translations/es.json b/custom_components/ui_lovelace_minimalist/translations/es.json index e60ffb8aa..78fef41b7 100644 --- a/custom_components/ui_lovelace_minimalist/translations/es.json +++ b/custom_components/ui_lovelace_minimalist/translations/es.json @@ -6,25 +6,25 @@ "title": "Configuración de UI Lovelace Minimalist", "description": "", "data": { - "community_cards_enabled": "Enable the ability to configure community cards with this integrations, Does require github authentication!" + "community_cards_enabled": "Activar la posibilidad de configurar las tarjetas de la comunidad con esta integración. ¡Requiere autenticación en GitHub!" } }, "device": { - "title": "Waiting for device activation" + "title": "Esperando la activación del dispositivo" }, "reauth_confirm": { - "title": "Reauthentication needed", - "description": "You need to reauthenticate with GitHub." + "title": "Se necesita reautenticación", + "description": "Tienes que volver a autentificarte en GitHub." } }, "abort": { - "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "single_instance_allowed": "Solo se permite una única configuración de UI Lovelace Minimalist.", "not_setup": "UI Lovelace Minimalist no está configurado.", - "github": "Could not authenticate with GitHub, try again later.", - "reauth_successful": "Reauthentication was successful." + "github": "No se ha podido autentificar con GitHub, inténtalo más tarde.", + "reauth_successful": "La reautenticación se ha realizado con éxito." }, "progress": { - "wait_for_device": "1. Open {url} \n2.Paste the following key to authorize ULM: \n```\n{code}\n```\n" + "wait_for_device": "1. Abre {url} \n2.Pega la siguiente clave para autorizar a ULM: \n```\n{code}\n```\n" } }, "options": { @@ -34,27 +34,27 @@ "description": "", "data": { "language": "Idioma", - "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_enabled": "Crear un nuevo panel en el panel lateral.", "sidepanel_icon": "Icono del panel lateral", "sidepanel_title": "Título del panel lateral", - "adaptive_ui_enabled": "Enable adaptive Dashboard with popup splitview", - "adaptive_ui_title": "adaptive panel title", - "adaptive_ui_icon": "adaptive panel icon", + "adaptive_ui_enabled": "Activar panel adaptable con vista dividida emergente", + "adaptive_ui_title": "título del panel adaptable", + "adaptive_ui_icon": "icono del panel adaptable", "theme": "Tema", - "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende.", - "community_cards_enabled": "Enable the ability to configure community cards with this integrations, Does require github authentication!", - "community_cards": "Select Community Cards you want to enable." + "include_other_cards": "Incluir recursos de tarjetas personalizadas necesarias.", + "community_cards_enabled": "Activar la posibilidad de configurar las tarjetas de la comunidad con esta integración. ¡Requiere autenticación en GitHub!", + "community_cards": "Selecciona las tarjetas de la comunidad que quieres activar." } } }, "abort": { - "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "single_instance_allowed": "Solo se permite una única configuración de UI Lovelace Minimalist.", "not_setup": "UI Lovelace Minimalist no está configurado." }, "error": { - "github_cards": "Something went wrong when fetching cards from Github.", - "ack": "You need to acknowledge all statements.", - "gh_token": "Github Token not set. Please re-install this integration to go throught the setup procedure. (No custom configuration will be lost)" + "github_cards": "Algo ha ido mal al obtener las tarjetas de Github.", + "ack": "Debes aceptar todas las declaraciones.", + "gh_token": "El token de Github no está configurado. Por favor, vuelve a instalar esta integración para pasar por el procedimiento de configuración. (No se perderá ninguna configuración personalizada)" } } } From b1033fd4e13b1d27943b14f4cc9838059605e4e8 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Fri, 28 Oct 2022 13:11:48 +0200 Subject: [PATCH 26/26] Fix for added border-lines in HA 2022.11 --- .../themefiles/minimalist-desktop/minimalist-desktop.yaml | 3 +++ .../minimalist-ios-tapbar/minimalist-ios-tapbar.yaml | 3 +++ .../minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml | 2 ++ .../themefiles/minimalist-mobile/minimalist-mobile.yaml | 3 +++ 4 files changed, 11 insertions(+) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-desktop/minimalist-desktop.yaml b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-desktop/minimalist-desktop.yaml index 58ec9b7ac..0c13e8351 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-desktop/minimalist-desktop.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-desktop/minimalist-desktop.yaml @@ -11,6 +11,9 @@ minimalist-desktop: divider-color: "rgba(var(--color-theme),.12)" accent-color: "var(--google-yellow)" ha-dialog-border-radius: "10px" + # fix added border-lines in 2022.11 + ha-card-border-width: "0px" + card-mod-theme: "minimalist-desktop" card-mod-view-yaml: | "*:first-child$": | diff --git a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-ios-tapbar/minimalist-ios-tapbar.yaml b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-ios-tapbar/minimalist-ios-tapbar.yaml index 16ae640c4..06f3f43ad 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-ios-tapbar/minimalist-ios-tapbar.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-ios-tapbar/minimalist-ios-tapbar.yaml @@ -13,6 +13,9 @@ minimalist-ios-tapbar: divider-color: "rgba(var(--color-theme),.12)" accent-color: "var(--google-yellow)" ha-dialog-border-radius: "10px" + # fix added border-lines in 2022.11 + ha-card-border-width: "0px" + card-mod-theme: "minimalist-ios-tapbar" card-mod-root: | app-toolbar { diff --git a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml index 99dabe509..35917722c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile-tapbar/minimalist-mobile-tapbar.yaml @@ -15,6 +15,8 @@ minimalist-mobile-tapbar: header-base-height: "70px" app-header-selection-bar-color: "transparent" ha-dialog-border-radius: "10px" + # fix added border-lines in 2022.11 + ha-card-border-width: "0px" card-mod-view-yaml: | "*:first-child$": | diff --git a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile/minimalist-mobile.yaml b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile/minimalist-mobile.yaml index 1ab435bb3..a27e7f745 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile/minimalist-mobile.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/themefiles/minimalist-mobile/minimalist-mobile.yaml @@ -11,6 +11,9 @@ minimalist-mobile: divider-color: "rgba(var(--color-theme),.12)" accent-color: "var(--google-yellow)" ha-dialog-border-radius: "10px" + # fix added border-lines in 2022.11 + ha-card-border-width: "0px" + card-mod-theme: "minimalist-mobile" card-mod-root: | app-toolbar {