From 2588810a1140fb4f6acbaddbb4a93af388a8d21d Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 29 Dec 2024 20:24:00 +0000 Subject: [PATCH 1/5] Fix card_vertical_button --- .../cards/card_vertical_button.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml index 4eaadb039..94d1aa26d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vertical_button.yaml @@ -85,12 +85,11 @@ card_vertical_button: // If we need to support other entities we can add these options here. return ""; ]]] - target: | - [[[ - var obj; - if( entity.entity_id.startsWith("input_select.") ) - obj = { entity_id: entity.entity_id, option: variables.ulm_card_vertical_button_state }; - else - obj = { entity_id: entity.entity_id }; - return obj; - ]]] + target: + entity_id: "[[[ return entity.entity_id; ]]]" + data: + option: | + [[[ + if( entity.entity_id.startsWith("input_select.") ) + return variables.ulm_card_vertical_button_state; + ]]] From 6f2cd2179d5bd24338a84b93c02ac6e01ad2d78d Mon Sep 17 00:00:00 2001 From: wilbiev Date: Mon, 30 Dec 2024 09:55:12 +0000 Subject: [PATCH 2/5] Updated nl.json --- .../translations/nl.json | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/translations/nl.json b/custom_components/ui_lovelace_minimalist/translations/nl.json index 740322270..7df294036 100644 --- a/custom_components/ui_lovelace_minimalist/translations/nl.json +++ b/custom_components/ui_lovelace_minimalist/translations/nl.json @@ -6,25 +6,25 @@ "title": "UI Lovelace Minimalist Instellingen", "description": "", "data": { - "community_cards_enabled": "Enable the ability to configure community cards with this integrations, Does require github authentication!" + "community_cards_enabled": "Schakel de mogelijkheid in om community cards te configureren met deze integratie. Hiervoor is GitHub-authenticatie vereist!" } }, "device": { - "title": "Waiting for device activation" + "title": "Wachten op activering van het apparaat" }, "reauth_confirm": { - "title": "Reauthentication needed", - "description": "You need to reauthenticate with GitHub." + "title": "Herauthenticatie nodig", + "description": "Je moet opnieuw authenticeren bij GitHub." } }, "abort": { - "single_instance_allowed": "Enkel een installatie van UI Lovelace Minimalist is toegestaan.", + "single_instance_allowed": "Slechts één configuratie van UI Lovelace Minimalist is toegestaan.", "not_setup": "UI Lovelace Minimalist is niet juist ingesteld.", - "github": "Could not authenticate with GitHub, try again later.", - "reauth_successful": "Reauthentication was successful." + "github": "Kon niet authenticeren met GitHub, probeer het later opnieuw.", + "reauth_successful": "Herauthenticatie was succesvol." }, "progress": { - "wait_for_device": "1. Open {url}\n2.Paste the following key to authorize ULM:\n\n```{code}```" + "wait_for_device": "1. Open {url}\n2.Plak de volgende sleutel om ULM te autoriseren:\n\n```{code}```" } }, "options": { @@ -34,37 +34,37 @@ "description": "", "data": { "language": "Taal", - "sidepanel_enabled": "Een Dashboard aan de zijbalk toevoegen", - "sidepanel_icon": "Dashboard icon", + "sidepanel_enabled": "Het dashboard aan de zijbalk toevoegen", + "sidepanel_icon": "Dashboard icoon", "sidepanel_title": "Dashboard titel", - "adaptive_ui_enabled": "Een adaptive Dashboard aan de zijbalk toevoegen", - "adaptive_ui_title": "adaptive dashboard titel", - "adaptive_ui_icon": "adaptive dashboard icon", + "adaptive_ui_enabled": "Het adaptief dashboard met popup splitview aan de zijbalk toevoegen", + "adaptive_ui_title": "Adaptief dashboard titel", + "adaptive_ui_icon": "Adaptief dashboard icoon", "theme": "Thema", - "include_other_cards": "'Frontend' repositories toevoegen die nodig zijn", - "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": "Voeg benodigde Home Assistant Community Store (HACS) repositories toe.", + "community_cards_enabled": "Schakel de mogelijkheid in om community cards te configureren met deze integratie. Hiervoor is GitHub-authenticatie vereist!", + "community_cards": "Selecteer Community Cards die je wilt gebruiken." } } }, "abort": { - "single_instance_allowed": "Enkel een installatie van UI Lovelace Minimalist is toegestaan.", + "single_instance_allowed": "Slechts één configuratie van UI Lovelace Minimalist is toegestaan.", "not_setup": "UI Lovelace Minimalist is niet juist ingesteld." }, "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": "Er ging iets mis bij het ophalen van kaarten uit GitHub.", + "ack": "Je moet alle meldingen bevestigen.", + "gh_token": "Github Token niet ingesteld. Installeer deze integratie opnieuw om de installatieprocedure te doorlopen. (De aangepaste configuratie gaat niet verloren)" } }, "services": { "reload": { "name": "Reload", - "description": "Herlaad dashboardconfiguratie voor UI Lovelace Minimalist." + "description": "Herlaad de dashboardconfiguratie voor UI Lovelace Minimalist." }, "installed": { "name": "Installed", - "description": "Wijzig de geïnstalleerde sleutel in globale configuratie voor UI Lovelace Minimalist." + "description": "Wijzig de geïnstalleerde sleutel in global config voor UI Lovelace Minimalist." } } } From c244e9cf1bfea30b4e12a664b7df924aa0bfbc7d Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sat, 4 Jan 2025 10:56:00 +0000 Subject: [PATCH 3/5] Update action cards, fix helpers.relativeTime --- .../lovelace/translations/default.yaml | 27 +++- .../ulm_templates/actions/actions_card.yaml | 150 +++++++++--------- .../ulm_templates/actions/actions_icon.yaml | 150 +++++++++--------- .../ulm_templates/actions/actions_name.yaml | 150 +++++++++--------- .../card_templates/cards/card_generic.yaml | 1 + .../cards/card_generic_swap.yaml | 1 + .../ui_lovelace_minimalist/manifest.json | 2 +- .../translations/sk.json | 18 +-- 8 files changed, 261 insertions(+), 238 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml index 9a56649b0..aee832135 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml @@ -33,10 +33,31 @@ ulm_translation_engine: let domain = entity.entity_id.substr(0, entity.entity_id.indexOf(".")); let mode = hass.resources[lang]["state_attributes." + domain + ".hvac_action." + action]; if(variables.ulm_show_last_changed){ - return helpers.relativeTime(entity.last_changed, true) + let dt = new Intl.RelativeTimeFormat(lang, { style: "long" }); + let delta = (Date.parse(entity.last_changed) - Date.now()) / 1000 + let days = 0 + if (delta > 1000) + days = parseInt(delta / (60 * 60 * 24)); + let hours = parseInt(Math.round(delta / (60 * 60)) % 24); + let hours_unrounded = parseInt((delta / (60 * 60)) % 24); + let minutes = parseInt(Math.round(delta / 60) % 60); + let minutes_unrounded = parseInt((delta / 60) % 60); + let seconds = parseInt(Math.round(delta) % 60); + if (days != 0) + return dt.format(days,"days"); + else if (hours_unrounded != 0) + return dt.format(hours,"hours"); + else if (minutes_unrounded != 0) + return dt.format(minutes,"minutes"); + return dt.format(seconds,"seconds"); } - if(device_class == 'timestamp'){ - return helpers.relativeTime(entity.state, true) + if(device_class == ('timestamp' || 'date')){ + let dt = new Intl.DateTimeFormat(lang, { + dateStyle: "long", + timeStyle: "short" + }); + let formatted_date = dt.format(Date.parse(entity.state)) + return formatted_date; } if(entity.entity_id.startsWith("climate.")){ return helpers.localize(entity, entity.attributes.current_temperature) + ' • ' + diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml index 76c996619..837c54781 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml @@ -16,10 +16,10 @@ ulm_actions_card: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -36,34 +36,34 @@ ulm_actions_card: ]]] navigation_path: "[[[ return variables.ulm_card_tap_action == 'navigate' ? variables.ulm_card_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_card_tap_haptic != null ? variables.ulm_card_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_card_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_card_tap_action == 'adaptive') return 'input_select.select_option'; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_card_tap_service !== undefined) + return variables.ulm_card_tap_service; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_card_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_card_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_card_tap_target !== undefined) + return variables.ulm_card_tap_target; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_card_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_card_tap_service_data; + if (variables.ulm_card_tap_action == 'adaptive'){ + return {'option': variables.ulm_input_select_option }; + else if (variables.ulm_card_tap_service_data !== undefined) + return variables.ulm_card_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -129,10 +129,10 @@ ulm_actions_card: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -149,34 +149,34 @@ ulm_actions_card: ]]] navigation_path: "[[[ return variables.ulm_card_hold_action == 'navigate' ? variables.ulm_card_hold_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_card_hold_haptic != null ? variables.ulm_card_hold_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_card_hold_action; - - if (action == 'adaptive'){ + if (variables.ulm_card_hold_action == 'adaptive') return 'input_select.select_option'; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_card_hold_service !== undefined) + return variables.ulm_card_hold_service; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_card_hold_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_card_hold_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_card_hold_target !== undefined) + return variables.ulm_card_hold_target; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_card_hold_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_card_hold_service_data; + if (variables.ulm_card_hold_action == 'adaptive') + return { 'option': variables.ulm_input_select_option }; + else if (variables.ulm_card_hold_service_data !== undefined) + return variables.ulm_card_hold_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -242,10 +242,10 @@ ulm_actions_card: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -262,34 +262,34 @@ ulm_actions_card: ]]] navigation_path: "[[[ return variables.ulm_card_double_tap_action == 'navigate' ? variables.ulm_card_double_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_card_double_tap_haptic != null ? variables.ulm_card_double_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_card_double_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_card_double_tap_action == 'adaptive') return 'input_select.select_option'; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_card_double_tap_service !== undefined) + return variables.ulm_card_double_tap_service; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_card_double_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_card_double_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_card_double_tap_target !== undefined) + return variables.ulm_card_double_tap_target; + else if ((entity != null) && entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_card_double_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if((entity != null) && entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_card_double_tap_service_data; + if (variables.ulm_card_double_tap_action == 'adaptive') + return { 'option': variables.ulm_input_select_option }; + else if (variables.ulm_card_double_tap_service_data !== undefined) + return variables.ulm_card_double_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml index 20edd621c..4cb1b2b3e 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml @@ -16,10 +16,10 @@ ulm_actions_icon: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -36,34 +36,34 @@ ulm_actions_icon: ]]] navigation_path: "[[[ return variables.ulm_icon_tap_action == 'navigate' ? variables.ulm_icon_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_icon_tap_haptic != null ? variables.ulm_icon_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_icon_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_icon_tap_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_icon_tap_service !== undefined) + return variables.ulm_icon_tap_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_icon_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_icon_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_icon_tap_target !== undefined) + return variables.ulm_icon_tap_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_icon_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_icon_tap_service_data; + if (variables.ulm_icon_tap_action == 'adaptive') + return { 'option': variables.ulm_input_select_option }; + else if (variables.ulm_icon_tap_service_data !== undefined) + return variables.ulm_icon_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -128,10 +128,10 @@ ulm_actions_icon: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -148,34 +148,34 @@ ulm_actions_icon: ]]] navigation_path: "[[[ return variables.ulm_icon_hold_action == 'navigate' ? variables.ulm_icon_hold_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_icon_hold_haptic != null ? variables.ulm_icon_hold_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_icon_hold_action; - - if (action == 'adaptive'){ + if (variables.ulm_icon_hold_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_icon_hold_service !== undefined) + return variables.ulm_icon_hold_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_icon_hold_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_icon_hold_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_icon_hold_target !== undefined) + return variables.ulm_icon_hold_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_icon_hold_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_icon_hold_service_data; + if (variables.ulm_icon_hold_action == 'adaptive') + return {'option': variables.ulm_input_select_option }; + else if (variables.ulm_icon_hold_service_data !== undefined) + return variables.ulm_icon_hold_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -241,10 +241,10 @@ ulm_actions_icon: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_card_light_enable_popup || variables.ulm_card_media_player_enable_popup || variables.ulm_card_thermostat_enable_popup || variables.ulm_card_cover_enable_popup)){ action = 'fire-dom-event' @@ -265,34 +265,34 @@ ulm_actions_icon: ]]] navigation_path: "[[[ return variables.ulm_icon_double_tap_action == 'navigate' ? variables.ulm_icon_double_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_icon_double_tap_haptic != null ? variables.ulm_icon_double_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_icon_double_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_icon_double_tap_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_icon_double_tap_service !== undefined) + return variables.ulm_icon_double_tap_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_icon_double_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_icon_double_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_icon_double_tap_target !== undefined) + return variables.ulm_icon_double_tap_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_icon_double_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_icon_double_tap_service_data; + if (variables.ulm_icon_double_tap_action == 'adaptive') + return { 'option': variables.ulm_input_select_option }; + else if (variables.ulm_icon_double_tap_service_data !== undefined) + return variables.ulm_icon_double_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml index 2da797a80..f1c5b70e7 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml @@ -16,10 +16,10 @@ ulm_actions_name: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -36,34 +36,34 @@ ulm_actions_name: ]]] navigation_path: "[[[ return variables.ulm_name_tap_action == 'navigate' ? variables.ulm_name_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_name_tap_haptic != null ? variables.ulm_name_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_name_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_name_tap_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_name_tap_service !== undefined) + return variables.ulm_name_tap_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_name_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_name_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_name_tap_target !== undefined) + return variables.ulm_name_tap_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_name_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_name_tap_service_data; + if (variables.ulm_name_tap_action == 'adaptive') + return {'option': variables.ulm_input_select_option }; + else if (variables.ulm_name_tap_service_data !== undefined) + return variables.ulm_name_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -129,10 +129,10 @@ ulm_actions_name: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -149,34 +149,34 @@ ulm_actions_name: ]]] navigation_path: "[[[ return variables.ulm_name_hold_action == 'navigate' ? variables.ulm_name_hold_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_name_hold_haptic != null ? variables.ulm_name_hold_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_name_hold_action; - - if (action == 'adaptive'){ + if (variables.ulm_name_hold_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_name_hold_service !== undefined) + return variables.ulm_name_hold_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_name_hold_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_name_hold_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_name_hold_target !== undefined) + return variables.ulm_name_hold_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_name_hold_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_name_hold_service_data; + if (variables.ulm_name_hold_action == 'adaptive') + return {'option': variables.ulm_input_select_option }; + else if (variables.ulm_name_hold_service_data !== undefined) + return variables.ulm_name_hold_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" @@ -242,10 +242,10 @@ ulm_actions_name: action = 'popup' } if (action == 'adaptive'){ - action = 'call-service' + action = 'perform-action' } if (domain == "media_player" && action == 'toggle'){ - action = 'call-service'; + action = 'perform-action'; } if (action == 'popup' && (variables.ulm_custom_popup != null )){ let popup_config = variables.ulm_custom_popup; @@ -262,34 +262,34 @@ ulm_actions_name: ]]] navigation_path: "[[[ return variables.ulm_name_double_tap_action == 'navigate' ? variables.ulm_name_double_tap_navigate_path : '/0' ]]]" haptic: "[[[ return variables.ulm_name_double_tap_haptic != null ? variables.ulm_name_double_tap_haptic : 'none' ]]]" - service: > + perform_action: > [[[ - var action = variables.ulm_name_double_tap_action; - - if (action == 'adaptive'){ + if (variables.ulm_name_double_tap_action == 'adaptive') return 'input_select.select_option'; - } - if(entity.entity_id.startsWith("media_player.")){ + else if (variables.ulm_name_double_tap_service !== undefined) + return variables.ulm_name_double_tap_service; + else if (entity.entity_id.startsWith("media_player.")) return 'media_player.media_play_pause'; - } - return variables.ulm_name_double_tap_service; + return ""; ]]] - service_data: > + target: + entity_id: > + [[[ + if (variables.ulm_name_double_tap_action == 'adaptive') + return variables.ulm_input_select; + else if (variables.ulm_name_double_tap_target !== undefined) + return variables.ulm_name_double_tap_target; + else if (entity.entity_id.startsWith("media_player.")) + return entity.entity_id; + return ""; + ]]] + data: > [[[ - var action = variables.ulm_name_double_tap_action; - - if (action == 'adaptive'){ - return { - 'option': variables.ulm_input_select_option, - 'entity_id': variables.ulm_input_select - }; - } - if(entity.entity_id.startsWith("media_player.")){ - return { - 'entity_id': entity.entity_id - }; - } - return variables.ulm_name_double_tap_service_data; + if (variables.ulm_name_double_tap_action == 'adaptive') + return { 'option': variables.ulm_input_select_option }; + else if (variables.ulm_name_double_tap_service_data !== undefined) + return variables.ulm_name_double_tap_service_data; + return ""; ]]] browser_mod: service: "browser_mod.popup" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml index b5c117a0e..afe2c9d33 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml @@ -10,6 +10,7 @@ card_generic: ulm_outlet_power_enable_popup: false ulm_card_generic_color: "blue" ulm_card_generic_force_background_color: false + triggers_update: "all" state: - operator: "template" value: "[[[ return variables.ulm_active_state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml index 9c62b59d8..53846df0e 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml @@ -10,6 +10,7 @@ card_generic_swap: ulm_outlet_power_enable_popup: false ulm_card_generic_swap_color: "blue" ulm_card_generic_swap_force_background_color: false + triggers_update: "all" state: - operator: "template" value: "[[[ return variables.ulm_active_state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/manifest.json b/custom_components/ui_lovelace_minimalist/manifest.json index 0aa0e891c..a6dad8c2b 100644 --- a/custom_components/ui_lovelace_minimalist/manifest.json +++ b/custom_components/ui_lovelace_minimalist/manifest.json @@ -17,5 +17,5 @@ "aiofiles>=0.8.0", "aiogithubapi>=22.2.4" ], - "version": "v1.3.11" + "version": "v1.3.15" } diff --git a/custom_components/ui_lovelace_minimalist/translations/sk.json b/custom_components/ui_lovelace_minimalist/translations/sk.json index 07afd0548..66683d939 100644 --- a/custom_components/ui_lovelace_minimalist/translations/sk.json +++ b/custom_components/ui_lovelace_minimalist/translations/sk.json @@ -6,7 +6,7 @@ "title": "Nastavenie UI Lovelace Minimalist", "description": "", "data": { - "community_cards_enabled": "Povoľte možnosť konfigurovať komunitné karty s touto integráciou, vyžaduje overenie github!" + "community_cards_enabled": "Povoľte možnosť konfigurovať komunitné karty s touto integráciou, vyžaduje overenie GitHub!" } }, "device": { @@ -20,7 +20,7 @@ "abort": { "single_instance_allowed": "Je dovolená iba jediná konfigurácia UI Lovelace Minimalist.", "not_setup": "UI Lovelace Minimalist nie je nastavená.", - "github": "Could not authenticate with GitHub, try again later.", + "github": "Nepodarilo sa overiť pomocou GitHub, skúste to znova neskôr.", "reauth_successful": "Opätovná autentifikácia bola úspešná." }, "progress": { @@ -38,11 +38,11 @@ "sidepanel_icon": "Ikona v postrannom paneli", "sidepanel_title": "Názov v postrannom paneli", "adaptive_ui_enabled": "Povoliť adaptívny informačný panel s vyskakovacím rozdeleným zobrazením", - "adaptive_ui_title": "názov adaptívneho panela", - "adaptive_ui_icon": "ikona adaptívneho panela", + "adaptive_ui_title": "Názov adaptívneho panela", + "adaptive_ui_icon": "Ikona adaptívneho panela", "theme": "Téma", "include_other_cards": "Do zdrojov zahrnúť vlastné karty potrebné pre túto integráciu.", - "community_cards_enabled": "Povoľte možnosť konfigurovať komunitné karty s touto integráciou, vyžaduje overenie github!", + "community_cards_enabled": "Povoľte možnosť konfigurovať komunitné karty s touto integráciou, vyžaduje overenie GitHub!", "community_cards": "Vyberte karty komunity, ktoré chcete povoliť." } } @@ -52,18 +52,18 @@ "not_setup": "UI Lovelace Minimalist nie je nastavená." }, "error": { - "github_cards": "Pri načítavaní kariet z Githubu sa vyskytla chyba.", + "github_cards": "Pri načítavaní kariet z GitHubu sa vyskytla chyba.", "ack": "Musíte potvrdiť všetky vyhlásenia.", - "gh_token": "Github Token nie je nastavený. Ak chcete prejsť procesom nastavenia, znova nainštalujte túto integráciu. (Žiadna vlastná konfigurácia sa nestratí)" + "gh_token": "GitHub Token nie je nastavený. Ak chcete prejsť procesom nastavenia, znova nainštalujte túto integráciu. (Žiadna vlastná konfigurácia sa nestratí)" } }, "services": { "reload": { - "name": "Reload", + "name": "Znovu načítať", "description": "Znovu načítajte konfiguráciu dashboardu pre používateľské rozhranie Lovelace Minimalist." }, "installed": { - "name": "Installed", + "name": "Nainštalované", "description": "Zmeňte nainštalovaný kľúč v globálnej konfigurácii pre používateľské rozhranie Lovelace Minimalist." } } From 79a75fabdc7d789551eccdde5a9f2815ba429c50 Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sat, 4 Jan 2025 20:46:46 +0000 Subject: [PATCH 4/5] Fix color issue card_binary_sensor_alert --- .../cards/card_binary_sensor_alert.yaml | 1 + .../internal_templates/icon_alert.yaml | 12 +++++++----- .../internal_templates/icon_info_alert.yaml | 12 +++++++----- .../internal_templates/icon_more_info_alert.yaml | 12 ++++++------ .../internal_templates/icon_more_info_new.yaml | 12 ++++++------ 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml index 52e27d098..458c3b40b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml @@ -12,6 +12,7 @@ card_binary_sensor_alert: ulm_outlet_power_enable_popup: false ulm_card_binary_sensor_alert_color: "blue" ulm_card_binary_sensor_alert_force_background_color: false + ulm_icon_alert_color: "[[[ return variables.ulm_card_binary_sensor_alert_color ]]]" state: - operator: "template" value: "[[[ return variables.ulm_active_state ]]]" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml index 3731e4b1b..4d423798d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml @@ -1,6 +1,8 @@ --- ### Icon Alert ### icon_alert: + variables: + ulm_icon_alert_color: "blue" color: "var(--google-grey)" show_icon: true show_label: false @@ -17,15 +19,15 @@ icon_alert: ]]] styles: icon: - - color: "rgba(var(--color-blue),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_alert_color}), 1)`; ]]]" label: - - color: "rgba(var(--color-blue-text),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_alert_color}-text), 1)`; ]]]" name: - - color: "rgba(var(--color-blue-text),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_alert_color}-text), 1)`; ]]]" img_cell: - - background-color: "rgba(var(--color-blue), 0.2)" + - background-color: "[[[ return `rgba(var(--color-${variables.ulm_icon_alert_color}), 0.2)`; ]]]" card: - - background-color: "rgba(var(--color-background-blue), var(--opacity-bg))" + - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_alert_color}-text), var(--opacity-bg))`; ]]]" custom_fields: notification: - border-radius: "50%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml index 6903f3b67..66b2de41c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml @@ -2,6 +2,8 @@ ### Icon Info Alert ### icon_info_alert: template: "ulm_custom_actions" + variables: + ulm_icon_info_alert_color: "blue" color: "var(--google-grey)" show_icon: true show_label: true @@ -18,15 +20,15 @@ icon_info_alert: ]]] styles: icon: - - color: "rgba(var(--color-blue),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_info_alert_color}), 1)`; ]]]" label: - - color: "rgba(var(--color-blue-text),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_info_alert_color}-text), 1)`; ]]]" name: - - color: "rgba(var(--color-blue-text),1)" + - color: "[[[ return `rgba(var(--color-${variables.ulm_icon_info_alert_color}-text), 1)`; ]]]" img_cell: - - background-color: "rgba(var(--color-blue), 0.2)" + - background-color: "[[[ return `rgba(var(--color-${variables.ulm_icon_info_alert_color}), 0.2)`; ]]]" card: - - background-color: "rgba(var(--color-background-blue), var(--opacity-bg))" + - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_info_alert_color}-text), var(--opacity-bg))`; ]]]" custom_fields: notification: - border-radius: "50%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_alert.yaml index da2ed80c4..be7aa0a37 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_alert.yaml @@ -48,17 +48,17 @@ icon_more_info_alert: ulm_icon_tap_haptic: "[[[ return variables.ulm_icon_tap_haptic; ]]]" ulm_icon_tap_navigate_path: "[[[ return variables.ulm_icon_tap_navigate_path; ]]]" ulm_icon_tap_service: "[[[ return variables.ulm_icon_tap_service; ]]]" - ulm_icon_tap_service_data: "[[[ return variables.ulm_icon_tap_service_data]]]" + ulm_icon_tap_service_data: "[[[ return variables.ulm_icon_tap_service_data; ]]]" ulm_icon_hold_action: "[[[ return variables.ulm_icon_hold_action; ]]]" ulm_icon_hold_haptic: "[[[ return variables.ulm_icon_hold_haptic; ]]]" ulm_icon_hold_navigate_path: "[[[ return variables.ulm_icon_hold_navigate_path; ]]]" ulm_icon_hold_service: "[[[ return variables.ulm_icon_hold_service; ]]]" - ulm_icon_hold_service_data: "[[[ return variables.ulm_icon_hold_service_data]]]" + ulm_icon_hold_service_data: "[[[ return variables.ulm_icon_hold_service_data; ]]]" ulm_icon_double_tap_action: "[[[ return variables.ulm_icon_double_tap_action; ]]]" ulm_icon_double_tap_haptic: "[[[ return variables.ulm_icon_double_tap_haptic; ]]]" ulm_icon_double_tap_navigate_path: "[[[ return variables.ulm_icon_double_tap_navigate_path; ]]]" ulm_icon_double_tap_service: "[[[ return variables.ulm_icon_double_tap_service; ]]]" - ulm_icon_double_tap_service_data: "[[[ return variables.ulm_icon_double_tap_service_data]]]" + ulm_icon_double_tap_service_data: "[[[ return variables.ulm_icon_double_tap_service_data; ]]]" ulm_custom_popup: "[[[ return variables.ulm_custom_popup; ]]]" styles: card: @@ -78,17 +78,17 @@ icon_more_info_alert: ulm_name_tap_haptic: "[[[ return variables.ulm_name_tap_haptic; ]]]" ulm_name_tap_navigate_path: "[[[ return variables.ulm_name_tap_navigate_path; ]]]" ulm_name_tap_service: "[[[ return variables.ulm_name_tap_service; ]]]" - ulm_name_tap_service_data: "[[[ return variables.ulm_name_tap_service_data]]]" + ulm_name_tap_service_data: "[[[ return variables.ulm_name_tap_service_data; ]]]" ulm_name_hold_action: "[[[ return variables.ulm_name_hold_action; ]]]" ulm_name_hold_haptic: "[[[ return variables.ulm_name_hold_haptic; ]]]" ulm_name_hold_navigate_path: "[[[ return variables.ulm_name_hold_navigate_path; ]]]" ulm_name_hold_service: "[[[ return variables.ulm_name_hold_service; ]]]" - ulm_name_hold_service_data: "[[[ return variables.ulm_name_hold_service_data]]]" + ulm_name_hold_service_data: "[[[ return variables.ulm_name_hold_service_data; ]]]" ulm_name_double_tap_action: "[[[ return variables.ulm_name_double_tap_action; ]]]" ulm_name_double_tap_haptic: "[[[ return variables.ulm_name_double_tap_haptic; ]]]" ulm_name_double_tap_navigate_path: "[[[ return variables.ulm_name_double_tap_navigate_path; ]]]" ulm_name_double_tap_service: "[[[ return variables.ulm_name_double_tap_service; ]]]" - ulm_name_double_tap_service_data: "[[[ return variables.ulm_name_double_tap_service_data]]]" + ulm_name_double_tap_service_data: "[[[ return variables.ulm_name_double_tap_service_data; ]]]" ulm_custom_popup: "[[[ return variables.ulm_custom_popup; ]]]" styles: card: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_new.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_new.yaml index 1208153c7..39097d891 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_new.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_more_info_new.yaml @@ -47,17 +47,17 @@ icon_more_info_new: ulm_icon_tap_haptic: "[[[ return variables.ulm_icon_tap_haptic; ]]]" ulm_icon_tap_navigate_path: "[[[ return variables.ulm_icon_tap_navigate_path; ]]]" ulm_icon_tap_service: "[[[ return variables.ulm_icon_tap_service; ]]]" - ulm_icon_tap_service_data: "[[[ return variables.ulm_icon_tap_service_data]]]" + ulm_icon_tap_service_data: "[[[ return variables.ulm_icon_tap_service_data; ]]]" ulm_icon_hold_action: "[[[ return variables.ulm_icon_hold_action; ]]]" ulm_icon_hold_haptic: "[[[ return variables.ulm_icon_hold_haptic; ]]]" ulm_icon_hold_navigate_path: "[[[ return variables.ulm_icon_hold_navigate_path; ]]]" ulm_icon_hold_service: "[[[ return variables.ulm_icon_hold_service; ]]]" - ulm_icon_hold_service_data: "[[[ return variables.ulm_icon_hold_service_data]]]" + ulm_icon_hold_service_data: "[[[ return variables.ulm_icon_hold_service_data; ]]]" ulm_icon_double_tap_action: "[[[ return variables.ulm_icon_double_tap_action; ]]]" ulm_icon_double_tap_haptic: "[[[ return variables.ulm_icon_double_tap_haptic; ]]]" ulm_icon_double_tap_navigate_path: "[[[ return variables.ulm_icon_double_tap_navigate_path; ]]]" ulm_icon_double_tap_service: "[[[ return variables.ulm_icon_double_tap_service; ]]]" - ulm_icon_double_tap_service_data: "[[[ return variables.ulm_icon_double_tap_service_data]]]" + ulm_icon_double_tap_service_data: "[[[ return variables.ulm_icon_double_tap_service_data; ]]]" ulm_custom_popup: "[[[ return variables.ulm_custom_popup; ]]]" styles: card: @@ -83,17 +83,17 @@ icon_more_info_new: ulm_name_tap_haptic: "[[[ return variables.ulm_name_tap_haptic; ]]]" ulm_name_tap_navigate_path: "[[[ return variables.ulm_name_tap_navigate_path; ]]]" ulm_name_tap_service: "[[[ return variables.ulm_name_tap_service; ]]]" - ulm_name_tap_service_data: "[[[ return variables.ulm_name_tap_service_data]]]" + ulm_name_tap_service_data: "[[[ return variables.ulm_name_tap_service_data; ]]]" ulm_name_hold_action: "[[[ return variables.ulm_name_hold_action; ]]]" ulm_name_hold_haptic: "[[[ return variables.ulm_name_hold_haptic; ]]]" ulm_name_hold_navigate_path: "[[[ return variables.ulm_name_hold_navigate_path; ]]]" ulm_name_hold_service: "[[[ return variables.ulm_name_hold_service; ]]]" - ulm_name_hold_service_data: "[[[ return variables.ulm_name_hold_service_data]]]" + ulm_name_hold_service_data: "[[[ return variables.ulm_name_hold_service_data; ]]]" ulm_name_double_tap_action: "[[[ return variables.ulm_name_double_tap_action; ]]]" ulm_name_double_tap_haptic: "[[[ return variables.ulm_name_double_tap_haptic; ]]]" ulm_name_double_tap_navigate_path: "[[[ return variables.ulm_name_double_tap_navigate_path; ]]]" ulm_name_double_tap_service: "[[[ return variables.ulm_name_double_tap_service; ]]]" - ulm_name_double_tap_service_data: "[[[ return variables.ulm_name_double_tap_service_data]]]" + ulm_name_double_tap_service_data: "[[[ return variables.ulm_name_double_tap_service_data; ]]]" ulm_custom_popup: "[[[ return variables.ulm_custom_popup; ]]]" styles: card: From a5ffab86342ebb1a8c1a2e5b565e4e95590d5940 Mon Sep 17 00:00:00 2001 From: wilbiev Date: Sun, 5 Jan 2025 10:21:26 +0000 Subject: [PATCH 5/5] Small fix --- .../card_templates/internal_templates/icon_alert.yaml | 2 +- .../card_templates/internal_templates/icon_info_alert.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml index 4d423798d..e04d2a76b 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_alert.yaml @@ -27,7 +27,7 @@ icon_alert: img_cell: - background-color: "[[[ return `rgba(var(--color-${variables.ulm_icon_alert_color}), 0.2)`; ]]]" card: - - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_alert_color}-text), var(--opacity-bg))`; ]]]" + - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_alert_color}), var(--opacity-bg))`; ]]]" custom_fields: notification: - border-radius: "50%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml index 66b2de41c..34a2a442c 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/internal_templates/icon_info_alert.yaml @@ -28,7 +28,7 @@ icon_info_alert: img_cell: - background-color: "[[[ return `rgba(var(--color-${variables.ulm_icon_info_alert_color}), 0.2)`; ]]]" card: - - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_info_alert_color}-text), var(--opacity-bg))`; ]]]" + - background-color: "[[[ return `rgba(var(--color-background-${variables.ulm_icon_info_alert_color}), var(--opacity-bg))`; ]]]" custom_fields: notification: - border-radius: "50%"