diff --git a/custom_cards/custom_card_damix48_power_details/languages/es.yaml b/custom_cards/custom_card_damix48_power_details/languages/es.yaml new file mode 100644 index 000000000..9d0d1c749 --- /dev/null +++ b/custom_cards/custom_card_damix48_power_details/languages/es.yaml @@ -0,0 +1,7 @@ +--- +ulm_custom_card_damix48_power_details_language_variables: + variables: + ulm_custom_card_damix48_power_details_hour: "hora" + ulm_custom_card_damix48_power_details_hours: "horas" + ulm_custom_card_damix48_power_details_in_the_last: "En la última" + ulm_custom_card_damix48_power_details_in_the_lasts: "En las últimas" diff --git a/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml new file mode 100644 index 000000000..08f72bf65 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml @@ -0,0 +1,11 @@ +--- +ulm_custom_card_eraycetinay_elapsed_time_language_variables: + variables: + custom_card_eraycetinay_elapsed_time_day: "día" + custom_card_eraycetinay_elapsed_time_days: "días" + custom_card_eraycetinay_elapsed_time_hour: "hora" + custom_card_eraycetinay_elapsed_time_hours: "horas" + custom_card_eraycetinay_elapsed_time_minute: "minuto" + custom_card_eraycetinay_elapsed_time_minutes: "minutos" + custom_card_eraycetinay_elapsed_time_ago: "atrás" + custom_card_eraycetinay_elapsed_time_justnow: "justo ahora" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml new file mode 100644 index 000000000..8ed2b7f11 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/de.yaml @@ -0,0 +1,8 @@ +--- +ulm_custom_card_eraycetinay_lock_language_variables: + variables: + custom_card_eraycetinay_lock_locked: "verriegelt" + custom_card_eraycetinay_lock_unlocked: "entriegelt" + custom_card_eraycetinay_lock_locking: "verriegeln" + custom_card_eraycetinay_lock_unlocking: "entriegeln" + custom_card_eraycetinay_lock_unavailable: "nicht verfügbar" diff --git a/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml new file mode 100644 index 000000000..38f06f5a2 --- /dev/null +++ b/custom_cards/custom_card_eraycetinay_lock/languages/es.yaml @@ -0,0 +1,8 @@ +--- +ulm_custom_card_eraycetinay_lock_language_variables: + variables: + custom_card_eraycetinay_lock_locked: "bloqueado" + custom_card_eraycetinay_lock_unlocked: "desbloqueado" + custom_card_eraycetinay_lock_locking: "bloqueando" + custom_card_eraycetinay_lock_unlocking: "desbloqueando" + custom_card_eraycetinay_lock_unavailable: "no disponible" diff --git a/custom_cards/custom_card_heat_pump/languages/es.yaml b/custom_cards/custom_card_heat_pump/languages/es.yaml new file mode 100644 index 000000000..a027e0df1 --- /dev/null +++ b/custom_cards/custom_card_heat_pump/languages/es.yaml @@ -0,0 +1,9 @@ +--- +custom_card_heat_pump_language_variables: + variables: + custom_card_heat_pump_off: "Apagada" + custom_card_heat_pump_dry: "Seco" + custom_card_heat_pump_heat: "Calor" + custom_card_heat_pump_heat_cool: "Automático" + custom_card_heat_pump_cool: "Frío" + custom_card_heat_pump_fan_only: "Sólo ventilador" diff --git a/custom_cards/custom_card_homeassistant_updates/README.md b/custom_cards/custom_card_homeassistant_updates/README.md index f5ef2d33d..d602f0d18 100644 --- a/custom_cards/custom_card_homeassistant_updates/README.md +++ b/custom_cards/custom_card_homeassistant_updates/README.md @@ -171,7 +171,7 @@ card_homeassistant_updates: icon: "mdi:cog" tap_action: action: "navigate" - navigation_path: "/config/server_control" + navigation_path: "/developer-tools/yaml" item3: card: diff --git a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml index 71259d383..da3600d2c 100644 --- a/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml +++ b/custom_cards/custom_card_homeassistant_updates/custom_card_homeassistant_updates.yaml @@ -86,7 +86,7 @@ card_homeassistant_updates: icon: "mdi:cog" tap_action: action: "navigate" - navigation_path: "/config/server_control" + navigation_path: "/developer-tools/yaml" item3: card: diff --git a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml index d409e4e81..181fe80f2 100644 --- a/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml +++ b/custom_cards/custom_card_irmajavi_speedtest/custom_card_irmajavi_speedtest.yaml @@ -80,6 +80,8 @@ custom_card_irmajavi_speedtest: custom_fields: item1: - justify-self: "end" + - margin-top: "-23px" + - margin-right: "3px" icon: - color: "rgba(var(--color-theme),0.9)" - width: "20px" @@ -94,6 +96,8 @@ custom_card_irmajavi_speedtest: - justify-self: "start" - font-weight: "bold" - font-size: "16px" + - margin-left: "40px" + - margin-top: "3px" grid: - grid-template-areas: "i n item1" - grid-template-columns: "min-content" diff --git a/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml new file mode 100644 index 000000000..1bc5651e8 --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml @@ -0,0 +1,57 @@ +--- +### Custom Card More Power Outlet ### +custom_card_more_power_outlet: + template: + - "icon_info_bg" + - "yellow" + - "ulm_language_variables" + variables: + custom_card_more_power_outlet_power_sensor: + custom_card_more_power_outlet_energy_sensor: + custom_card_more_power_outlet_time_sensor: + triggers_update: "all" + label: |- + [[[ + if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on") { + return variables.ulm_on; + } else if (entity.state === "off" && variables.custom_card_more_power_outlet_energy_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_energy_sensor].state > 0){ + return variables.ulm_off + " • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; + } else { + return variables.ulm_off; + } + } else if (entity.state === "off") { + return variables.ulm_off; + } else if (entity.state === "unavailable") { + return variables.ulm_unavailable; + } else { + return entity.state; + } + ]]] diff --git a/custom_cards/custom_card_more_power_outlet/readme.md b/custom_cards/custom_card_more_power_outlet/readme.md new file mode 100644 index 000000000..819124663 --- /dev/null +++ b/custom_cards/custom_card_more_power_outlet/readme.md @@ -0,0 +1,94 @@ +--- +title: More Power Outlet Card +--- + + +## Description + +image + +This is the power outlet card is very similar to the default `power-outlet-card` from UI-Minimalist but it is also possible to show two additional sensors - one for total energy and one for time. + +## Credits + +Author: Wranglatang - 2022 Vesion 1.0.0 + +## Variables + +| Variable | Default | Required | Notes | +|----------|---------|------------------|-------------------| +| entity | | :material-check: | | +|name| | :material-check: | Enable background | +|custom_card_more_power_outlet_power_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the current power consumption (W). | +|custom_card_more_power_outlet_energy_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the energy consumption (kWh) - Typically used with a Daily [Utility Meter](https://www.home-assistant.io/integrations/utility_meter). | +|custom_card_more_power_outlet_time_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the a duration (Mins) - Typically used with the [History Stats](https://www.home-assistant.io/integrations/history_stats). | + +## Usage + +```yaml +- type: 'custom:button-card' + template: custom_card_more_power_outlet + variables: + custom_card_more_power_outlet_power_sensor: sensor.immersion_heater_power + custom_card_more_power_outlet_energy_sensor: sensor.immersion_heater_energy_daily + custom_card_more_power_outlet_time_sensor: sensor.time_immersion_heater_heating + entity: switch.immersion_heater + name: Immersion Heater +``` + +## Template code + +```yaml +--- +### Custom Card More Power Outlet ### +custom_card_more_power_outlet: + template: + - "icon_info_bg" + - "yellow" + - "ulm_language_variables" + variables: + custom_card_more_power_outlet_power_sensor: + custom_card_more_power_outlet_energy_sensor: + custom_card_more_power_outlet_time_sensor: + triggers_update: "all" + label: |- + [[[ + if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) { + return states[variables.custom_card_more_power_outlet_power_sensor].state + "W"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) { + return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; + + } else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) { + if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ + return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; + } else + return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; + } else if (entity.state === "on") { + return variables.ulm_on; + } else if (entity.state === "off") { + return variables.ulm_off; + } else if (entity.state === "unavailable") { + return variables.ulm_unavailable; + } else { + return entity.state; + } + ]]] +``` diff --git a/custom_cards/custom_card_nas/README.md b/custom_cards/custom_card_nas/README.md index 25bc874aa..f59ad2701 100644 --- a/custom_cards/custom_card_nas/README.md +++ b/custom_cards/custom_card_nas/README.md @@ -9,6 +9,8 @@ hide: The `card-nas` shows you a specific sensor value from your NAS, eg. the disk space used. +![Screenshot](../../docs/assets/img/custom_card_nas.png) + ## Credits Author: tben - 2021 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -69,19 +75,55 @@ n/a ## Template code ```yaml +--- custom_card_nas: - tap_action: - action: more-info template: - - blue + - "blue_no_state" + tap_action: + action: "more-info" + entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]" + show_icon: true show_label: true + show_name: true + icon: |- + [[[ + return "mdi:nas"; + ]]] label: |- - [[[ - if (entity.state == 'on'){ - var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - } else { - var state = "Off"; - } - return state; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] + name: |- + [[[ + return "Nas"; + ]]] + size: "20px" + styles: + label: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + name: + - align-self: "end" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - filter: "opacity(100%)" + img_cell: + - border-radius: "50%" + - place-self: "center" + - width: "42px" + - height: "42px" + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + card: + - border-radius: "20px" + - box-shadow: "var(--box-shadow)" + - padding: "12px" ``` diff --git a/custom_cards/custom_card_nas/custom_card_nas.yaml b/custom_cards/custom_card_nas/custom_card_nas.yaml index 30823686c..fc90957ba 100644 --- a/custom_cards/custom_card_nas/custom_card_nas.yaml +++ b/custom_cards/custom_card_nas/custom_card_nas.yaml @@ -1,16 +1,51 @@ --- custom_card_nas: + template: + - "blue_no_state" tap_action: action: "more-info" - template: - - "blue" + entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]" + show_icon: true show_label: true + show_name: true + icon: |- + [[[ + return "mdi:nas"; + ]]] label: |- [[[ - if (states[variables.ulm_custom_card_nas_sensor].state == 'on'){ - var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - } else { - var state = "Off"; - } - return state; + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] + name: |- + [[[ + return "Nas"; ]]] + size: "20px" + styles: + label: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + name: + - align-self: "end" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - filter: "opacity(100%)" + img_cell: + - border-radius: "50%" + - place-self: "center" + - width: "42px" + - height: "42px" + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + card: + - border-radius: "20px" + - box-shadow: "var(--box-shadow)" + - padding: "12px" diff --git a/custom_cards/custom_card_paddy_welcome/languages/es.yaml b/custom_cards/custom_card_paddy_welcome/languages/es.yaml index 8bd843098..499e86cbe 100644 --- a/custom_cards/custom_card_paddy_welcome/languages/es.yaml +++ b/custom_cards/custom_card_paddy_welcome/languages/es.yaml @@ -1,7 +1,7 @@ --- ulm_custom_card_paddy_welcome_language_variables: variables: - ulm_custom_card_paddy_welcome_morning: "Buenos días" - ulm_custom_card_paddy_welcome_afternoon: "Buenas tardes" - ulm_custom_card_paddy_welcome_evening: "Buenas noches" - ulm_custom_card_paddy_welcome_hello: "Hola" + ulm_custom_card_paddy_welcome_morning: "¡Buenos días" + ulm_custom_card_paddy_welcome_afternoon: "¡Buenas tardes" + ulm_custom_card_paddy_welcome_evening: "¡Buenas noches" + ulm_custom_card_paddy_welcome_hello: "¡Hola" diff --git a/custom_cards/custom_card_wsly_pollen/languages/ES.yaml b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml new file mode 100644 index 000000000..d991665cb --- /dev/null +++ b/custom_cards/custom_card_wsly_pollen/languages/ES.yaml @@ -0,0 +1,10 @@ +# ES.yaml for custom_card_wsly_pollen +--- +custom_card_wsly_pollen_language_variables: + variables: + custom_card_wsly_pollen_none: "Ninguno" + custom_card_wsly_pollen_very_low: "Muy bajo" + custom_card_wsly_pollen_low: "Bajo" + custom_card_wsly_pollen_medium: "Medio" + custom_card_wsly_pollen_high: "Alto" + custom_card_wsly_pollen_very_high: "Muy alto" diff --git a/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml new file mode 100644 index 000000000..2a67c870b --- /dev/null +++ b/custom_cards/custom_card_yagrasdemonde_lights_count/languages/ES.yaml @@ -0,0 +1,9 @@ +--- +ulm_custom_card_yagrasdemonde_lights_count_language_variables: + variables: + ulm_custom_card_yagrasdemonde_lights_count_light_0: "Ninguna luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_1: "1 luz encendida" + ulm_custom_card_yagrasdemonde_lights_count_light_many: "luces encendidas" + ulm_custom_card_yagrasdemonde_lights_count_cover_0: "Ninguna cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_1: "1 cortina abierta" + ulm_custom_card_yagrasdemonde_lights_count_cover_many: "cortinas abiertas" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml index 0ba7ce89c..e0638b80d 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button.yaml @@ -11,6 +11,8 @@ popup_button: card: - background: "none" - box-shadow: "none" + - border-radius: "none" + - padding: "12px" icon: - color: "var(--primary-color)" img_cell: diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml new file mode 100644 index 000000000..6933d9fd6 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_app.yaml @@ -0,0 +1,118 @@ +--- +popup_button_app: + template: + - "popup_button" + show_name: true + show_label: true + styles: + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + label: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + name: + - align-self: "end" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - margin-top: "0px" + icon: + - color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "#1DB954"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "#1DB954"; + } + return color; + ]]] + img_cell: + - border: "1px solid var(--color-theme)" + - border-shadow: "none" + - background-color: > + [[[ + var color = "var(--color-theme)"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app = "spotify"){ + color = "#434343"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var color = "#434343"; + } + return color; + ]]] + icon: > + [[[ + var icon = entity.attributes.icon || "mdi:speaker"; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var icon = "mdi:spotify"; + } else if(app == "google podcasts"){ + var icon = "mdi:google-podcast"; + } else if(app == "plex"){ + var icon = "mdi:plex"; + } else if(app == "soundcloud"){ + var icon = "mdi:soundcloud"; + } else if(app == "youtube music"){ + var icon = "mdi:youtube"; + } else if (app == "oto music"){ + var icon = "mdi:music-circle"; + } else if(app == "pandora"){ + var icon = "mdi:pandora"; + } else if(app == "netflix"){ + var icon = "mdi:netflix"; + } else if(app == "bluetooth audio"){ + var icon = "mdi:bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var icon = "mdi:spotify"; + } + return icon; + ]]] + label: > + [[[ + var label = entity.attributes.media_title || entity.attributes.friendly_name; + return label; + ]]] + name: > + [[[ + var name = entity.attributes.friendly_name; + if(entity.attributes.app_name){ + var app = entity.attributes.app_name.toLowerCase(); + if(app == "spotify"){ + var name = "Spotify"; + } else if(app == "google podcasts"){ + var name = "Google-Podcast"; + } else if(app == "plex"){ + var name = "Plex"; + } else if(app == "soundcloud"){ + var name = "Soundcloud"; + } else if(app == "youtube music"){ + var name = "Youtube"; + } else if (app == "oto music"){ + var name = "Oto Music"; + } else if(app == "pandora"){ + var name = "Pandora"; + } else if(app == "netflix"){ + var name = "Netflix"; + } else if(app == "bluetooth audio"){ + var name = "Bluetooth"; + } + } else if(entity.attributes.media_content_id.toLowerCase().includes("spotify")){ + var name = "Spotify"; + } + return name; + ]]] diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml new file mode 100644 index 000000000..a43106542 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_source.yaml @@ -0,0 +1,15 @@ +--- +popup_button_source: + template: + - "popup_button" + - "ulm_language_variables" + icon: "mdi:playlist-music" + name: "Source" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml index bdc7d8620..27054bd4a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_button_volume.yaml @@ -1,5 +1,17 @@ --- popup_button_volume: - template: "ulm_language_variables" + template: + - "popup_button" + - "ulm_language_variables" icon: "mdi:volume-high" name: "Volume" + styles: + name: + - text-transform: "uppercase" + - color: "rgba(var(--color-theme),0.5)" + img_cell: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + tap_action: + action: "more_info" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml new file mode 100644 index 000000000..1f548c7b9 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_card_volume.yaml @@ -0,0 +1,15 @@ +--- +popup_card_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: "80%" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml new file mode 100644 index 000000000..a0a33b42d --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_controls.yaml @@ -0,0 +1,76 @@ +--- +popup_chip_controls: + template: "chips" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.5)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "item1 item2 item3" + - justify-content: "space-evenly" + - display: "flex" + - grid-template-columns: "min-content min-content min-content" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-previous" + tap_action: + action: "call-service" + service: "media_player.media_previous_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.5)" + item2: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:play" + state: + - value: "playing" + icon: "mdi:pause" + tap_action: + action: "call-service" + service: "media_player.media_play_pause" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + item3: + card: + type: "custom:button-card" + template: "icon_controls" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + icon: "mdi:skip-next" + tap_action: + action: "call-service" + service: "media_player.media_next_track" + service_data: + entity_id: "[[[ return variables.ulm_popup_media_player_entity]]]" + styles: + icon: + - color: "rgba(var(--color-theme),0.5)" + +icon_controls: + show_icon: true + show_label: false + show_name: false + show_state: false + styles: + card: + - background: "none" + - box-shadow: "none" + - height: "42px" + grid: + - grid-template-areas: "'i'" + img_cell: + - width: "30px" + size: "80%" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml new file mode 100644 index 000000000..c0280a244 --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_chip_volume.yaml @@ -0,0 +1,23 @@ +--- +popup_chip_volume: + template: "chips" + show_icon: true + icon: "mdi:volume-high" + label: > + [[[ + let level = entity.attributes.volume_level + return level * 100 + '%' + ]]] + styles: + card: + - background: "none" + - box-shadow: "none" + - border: "1px solid rgba(var(--color-theme),0.25)" + - height: "42px" + - border-radius: "21px" + grid: + - grid-template-areas: "i l" + - justify-content: "space-between" + - display: "flex" + img_cell: + - width: "30px" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml index 03484ba24..04db54a4f 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_buttons/popup_header.yaml @@ -15,6 +15,8 @@ popup_header: - font-weight: "bold" - font-size: "12px" - filter: "opacity(40%)" + name: + - margin-top: "6px" icon: - color: "var(--color-theme)" label: |- diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml index 840f48f63..42c111946 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popup_layouts/popup_list_items.yaml @@ -4,3 +4,8 @@ popup_list_items: styles: card: - background: "none" + - border-radius: "none" + grid: + - grid-template-areas: "'item1 item2 item3'" + - justify-content: "space-evenly" + - display: "flex" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml index 0a1abfd11..ff8414935 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_light_brightness.yaml @@ -37,7 +37,6 @@ popup_light_brightness: } return columns.join(" "); ]]] - - column-gap: "30px" card: - background: "var(--primary-background-color)" - box-shadow: "none" diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml index 607ec7438..76b3e4e1a 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_media_player_infos.yaml @@ -1,15 +1,17 @@ --- popup_media_player_infos: + triggers_update: "all" styles: grid: - - grid-template-areas: "'header header' 'content1 content2' 'footer footer'" - - grid-template-rows: "16vh 56vh 14vh" - - grid-template-columns: "1fr 1fr" - - column-gap: "30px" + - grid-template-areas: "'header' 'content1' 'footer'" + - grid-template-rows: "14vh 56vh 16vh" + - row-gap: "2.5%" card: - background: "var(--primary-background-color)" - box-shadow: "none" - padding: "4%" + - border-radius: "none" + - height: "100vh" custom_fields: header: - align-self: "start" @@ -22,17 +24,18 @@ popup_media_player_infos: - max-width: "400px" - justify-self: "center" content2: - - align-self: "center" + - display: "none" buttons: - display: "none" footer: - align-self: "end" - margin-top: "25px" + - padding-bottom: "4%" extra_styles: | @media (max-width: 800px) { #container { - grid-template-areas: "header" "content1" "buttons" "footer" !important; - grid-template-rows: 16vh 52vh 14vh 14vh !important; + grid-template-areas: "header" "content1" "footer" !important; + grid-template-rows: 14vh 56vh 16vh !important; grid-template-columns: 1fr !important; } #buttons { @@ -52,14 +55,32 @@ popup_media_player_infos: content1: card: type: "custom:button-card" + show_icon: false + show_name: false + show_label: false styles: grid: - - grid-template-areas: "'picture' 'media' 'control'" + - grid-template-areas: "'app' 'picture' 'media' 'control' 'bar'" card: - - background: "none" + - background-blend-mode: "soft-light" + - background: | + [[[ + if(hass.themes.darkMode){ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, #333333 90%, grey 105% ,#333333 110%)' + : '' + }else{ + return states[variables.ulm_popup_media_player_entity].state == 'playing' && states[variables.ulm_popup_media_player_entity].attributes.entity_picture != null + ? ' center / cover url(' + states[variables.ulm_popup_media_player_entity].attributes.entity_picture + '), radial-gradient(circle, white 5%, grey 100% ,white 110%)' + : '' + } + ]]] - box-shadow: "none" - - padding: "4%" + - padding: "1%" custom_fields: + app: + - justify-self: "start" + - align-self: "start" picture: - margin-left: "auto" - margin-right: "auto" @@ -73,7 +94,17 @@ popup_media_player_infos: control: - background: "none" - box-shadow: "none" + bar: + - align-self: "start" + - background: "none" + - box-shadow: "none" + - margin-bottom: "12px" custom_fields: + app: + card: + type: "custom:button-card" + template: "popup_button_app" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" picture: card: type: "custom:mini-media-player" @@ -132,6 +163,7 @@ popup_media_player_infos: type: "custom:mini-media-player" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" hide: + controls: true icon: true name: true info: true @@ -145,43 +177,58 @@ popup_media_player_infos: background: none !important; box-shadow: none !important; width: 50% !important; - margin-left: auto !important; - margin-right: auto !important; + margin-left: 6px !important; + margin-right: 6px !important; } .mmp__bg{ background: none !important; } - buttons: - card: - type: "custom:button-card" - template: "list_2_items" - styles: - card: - - background: "none" - custom_fields: - item1: - card: - type: "custom:button-card" - template: - - "popup_button" - - "popup_button_selected" - - "popup_button_playing" - item2: + bar: card: type: "custom:button-card" - template: - - "popup_button" - - "popup_button_volume" - tap_action: - action: "fire-dom-event" - browser_mod: - command: "popup" - hide_header: true + template: "list_2_items" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + grid: + - display: "flex" + - justify-content: "center" + custom_fields: + item1: card: type: "custom:button-card" - template: "popup_media_player_volume" + template: "popup_chip_controls" variables: ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0px" + item2: + card: + type: "custom:button-card" + template: "popup_chip_volume" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + styles: + card: + - background: "none" + - box-shadow: "none" + - padding: "0" + tap_action: + action: "fire-dom-event" + browser_mod: + command: "popup" + hide_header: true + card: + type: "custom:button-card" + template: "popup_media_player_volume" + variables: + ulm_popup_media_player_entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" footer: card: type: "custom:button-card" @@ -196,6 +243,11 @@ popup_media_player_infos: type: "custom:button-card" template: "popup_button_power" entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" + item3: + card: + type: "custom:button-card" + template: "popup_button_source" + entity: "[[[ return variables.ulm_popup_media_player_entity ]]]" content2: card: type: "custom:my-slider" diff --git a/custom_components/ui_lovelace_minimalist/translations/es.json b/custom_components/ui_lovelace_minimalist/translations/es.json new file mode 100644 index 000000000..cc3a1677b --- /dev/null +++ b/custom_components/ui_lovelace_minimalist/translations/es.json @@ -0,0 +1,43 @@ +{ + "title": "UI Lovelace Minimalist", + "config": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + }, + "options": { + "step": { + "user": { + "title": "Configuración de UI Lovelace Minimalist", + "description": "", + "data": { + "language": "Idioma", + "sidepanel_enabled": "Habilitar la creación de una entrada en el panel lateral.", + "sidepanel_icon": "Icono del panel lateral", + "sidepanel_title": "Título del panel lateral", + "theme": "Tema", + "include_other_cards": "Incluir los recursos de la tarjeta personalizada de la que depende." + } + } + }, + "abort": { + "single_instance_allowed": "Sólo se permite una única configuración de UI Lovelace Minimalist.", + "not_setup": "UI Lovelace Minimalist no está configurado." + } + } +} diff --git a/docs/assets/img/custom_card_nas.png b/docs/assets/img/custom_card_nas.png new file mode 100644 index 000000000..8e5cc3ad4 Binary files /dev/null and b/docs/assets/img/custom_card_nas.png differ diff --git a/docs/usage/custom_cards/custom_card_homeassistant_updates.md b/docs/usage/custom_cards/custom_card_homeassistant_updates.md index 7d48be8a6..6240f62d5 100644 --- a/docs/usage/custom_cards/custom_card_homeassistant_updates.md +++ b/docs/usage/custom_cards/custom_card_homeassistant_updates.md @@ -171,7 +171,7 @@ card_homeassistant_updates: icon: "mdi:cog" tap_action: action: "navigate" - navigation_path: "/config/server_control" + navigation_path: "/developer-tools/yaml" item3: card: diff --git a/docs/usage/custom_cards/custom_card_nas.md b/docs/usage/custom_cards/custom_card_nas.md index 25bc874aa..7ae6a88c3 100644 --- a/docs/usage/custom_cards/custom_card_nas.md +++ b/docs/usage/custom_cards/custom_card_nas.md @@ -9,6 +9,8 @@ hide: The `card-nas` shows you a specific sensor value from your NAS, eg. the disk space used. +![Screenshot](../../assets/img/custom_card_nas.png) + ## Credits Author: tben - 2021 @@ -20,6 +22,10 @@ Version: 1.0.0 1.0.0 Initial release +
+1.0.1 +Fix card & add Screenshot +
## Usage @@ -59,7 +65,7 @@ n/a The text to show on your card -ulm_custom_cad_nas_unit +ulm_custom_card_nas_unit % yes The unit to show after your sensors state @@ -69,19 +75,55 @@ n/a ## Template code ```yaml +--- custom_card_nas: - tap_action: - action: more-info template: - - blue + - "blue_no_state" + tap_action: + action: "more-info" + entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]" + show_icon: true show_label: true + show_name: true + icon: |- + [[[ + return "mdi:nas"; + ]]] label: |- - [[[ - if (entity.state == 'on'){ - var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; - } else { - var state = "Off"; - } - return state; - ]]] + [[[ + return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; + ]]] + name: |- + [[[ + return "Nas"; + ]]] + size: "20px" + styles: + label: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + name: + - align-self: "end" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - filter: "opacity(100%)" + img_cell: + - border-radius: "50%" + - place-self: "center" + - width: "42px" + - height: "42px" + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + card: + - border-radius: "20px" + - box-shadow: "var(--box-shadow)" + - padding: "12px" ```