🌻 Lovelace UI • Minimalist

Been playing with the adaptive dashboard. Was able to get the light and mediaplayer popups to work but can’t get the room view popup to work. I’m using the custom card room Custom Card Room - UI Lovelace Minimalist. My thinking is this card hasn’t been updated to work with this. Would that be why I can’t get it to work?

That’s correct. Only official cards and cards that support official templates are updated to work with it.

You can still make it work though by adding this code to the card:

  double_tap_action:
    action: "call-service"
    service: "input_select.select_option"
    service_data:
      option: "[[[ return variables.ulm_input_select_option ]]]"
      entity_id: "[[[ return variables.ulm_input_select ]]]"

Hey, thanks for confirming! I added the code but still can’t seem to get it to work. Pretty sure I missed something but not sure what. My guess is I put the double_tap_action is the wrong place. Or maybe i went cross-eyed and missed something obvious :crazy_face:

Hello guys.

I’m trying to understand how to use the “Adaptive Dash” introduces on the 1.0.1 release.
I already knew how layout cards works due to the fact I used it time ago.

The point is that: I don’t understand how to manage some grid areas “unused” under mediaquery. In the example placed on github:

layout:
  # Tablet portrait
  grid-template-columns: "1fr 1fr 1fr 1fr 1fr 1fr"
  grid-template-areas: |
    "text text text weather weather weather"
    "welcome welcome welcome welcome welcome welcome"
    "title1 title1 title1 title1 title1 title1"
    "card1 card1 card2 card2 card3 card3"
    "title2 title2 title2 title2 title2 title2"
    "card4 card4 card5 card5 card6 card6"
  mediaquery:
    # Mobile
    "(max-width: 800px)":
      grid-template-columns: "1fr 1fr"
      grid-template-areas: |
        "welcome welcome"
        "person person"
        "title1 title1"
        "card1 card2"
        "card3 card4"
        "title2 title2"
        "card5 card6"
        "card7 card8"

As you can see, the fist line of areas (text and weather) doesn’t appear under mediaquery layout. That’s great, I don’t want to see those elements on the phone.

But those elements doesn’t simply disappear. They are placed randomly on the screen:

How can I solve this?
Thank you!

You can set a show parameter for the card to only show it when your screen is at least an x amount of pixels.
This is covered in the original docs of lay-out card and not in the minimalist docs.
to make it work for you you should change the grid placeholder to something like:

  - view_layout:
      grid-area: weather
      show:
        mediaquery: "(min-width: 801px)"

This is what I use in my personal setup to only show the weather card on non-mobile devices.

Edit: Add link to lay-out documentation where this is covered: https://github.com/thomasloven/lovelace-layout-card#card-visibility

Thank you so much! I totally missed this information from the Layout Card doc!

Sorry, I have one more question. I have a strange behavior with the popups placed on the right side:

2022-06-29_12-01-35_170

Do some one has an idea of what’s happening?
Thank!

2 Likes

@basbrus: may I ask for your help regarding the translation engine? Just upgraded to 1.0.2, I was able to iron out all of the issues I got, except 1 thing. I have 2 air conditions where the hvac_action is not provided by the integration. I created 2 helpers to calculate the action from the current and target temperatures, and also adjusted the thermostat card to take those values from the helper entities. Unfortunately the translation is taking the label from the main entity:

    ulm_translation_hvac: >
      [[[
        if (typeof(entity) !== 'undefined' && entity !== undefined){
          let state = entity.state;
          let d_class = entity.attributes.device_class;
          let def = ["unknown", "unavailable"];
          let lang = hass["language"];
          let action = entity.attributes.hvac_action;

So I have this now:

image

In the thermostat card I performed the following change:

entity.attributes.hvac_action → states[variables.ulm_card_thermostat_helper_entity].attributes.hvac_action

Can you help with the modification of /config/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml ? Thank you.

What I would do is create 2 custom files in the custom card directory. This will prevent overrides with updating. One for the translation engine → custom_default and one for the card itself → custom_card_thermostat

In both copy over the original code and change the name of the full template. In custom_default change

ulm_translation_hvac: >
      [[[
        if (typeof(entity) !== 'undefined' && entity !== undefined){
          let state = entity.state;
          let d_class = entity.attributes.device_class;
          let def = ["unknown", "unavailable"];
          let lang = hass["language"];
          let action = entity.attributes.hvac_action;

To:

ulm_translation_hvac: >
      [[[
        if (typeof(entity) !== 'undefined' && entity !== undefined){
          let state = entity.state;
          let d_class = entity.attributes.device_class;
          let def = ["unknown", "unavailable"];
          let lang = hass["language"];
          let action = states[variables.ulm_card_thermostat_helper_entity].attributes.hvac_action;

Than change in custom_card_thermostat the template ulm_translation_engine to name of the template in custom_default.yaml

Thank you, I will do that. Half of this is already done, as I started the build of my dashboard with the creation of the custom thermostat card. I was just confused what to do with the new translation engine. I will give feedback if I managed to fix this, thanks again, Bas.

EDIT: tried to edit directly the default translation file (keeping in mind it will be overwritten during the next update), swapped the entity to the helper, but no change after refresh of the dashboard. Any idea what could go wrong? Thank you.

I noticed last night that the popups on my regular minimalist dashboard (not the adaptive dashboard) stoped working after upgrading to 1.0.2. Thought I broken when working on my adaptive dashboard yesterday but if I roll back to 1.0.1 they work just fine. Was there a breaking change with 1.0.2 and popups?

From what I can tell you just need to add uln_card_name_enable_popup: true for this to work which I have. I also setup the adaptive ui for icon tap action as popup. Taping the icon on the card just brings up more into. However if I double tap the icon it will open the popup

I have exactly the same.
My light card definition looks like this:

      - type: "custom:button-card"
        template: card_light
        entity: light.0x588e81fffeacf5c4
        variables:
          ulm_card_light_enable_slider: true
          ulm_card_light_enable_color: true
          ulm_card_light_force_background_color: true
          ulm_card_light_enable_collapse: true
          ulm_card_light_enable_popup: true

And custom_actions.yaml looks like this:

---
ulm_custom_actions:
  variables:
    ulm_card_tap_action: "toggle"
    ulm_card_hold_action: "popup"
    ulm_card_double_tap_action: "more-info"
    ulm_icon_tap_action: "toggle"
    ulm_icon_hold_action: "popup"
    ulm_icon_double_tap_action: "more-info"
    ulm_name_tap_action: "toggle"
    ulm_name_hold_action: "popup"
    ulm_name_double_tap_action: "more-info"

I must be missing something. Hold does not show a popup at all and double tap shows the old popup. I’ve never been able to show the custom popup on a light card.

Help is appreciated.

can someone help me understand the following.

default theme: pink

1.yaml:
title: 1st view
path: 1st
theme: blue

2.yaml:
title: 2nd view
path: 2nd
theme: red

will the global setting of the theme be over write with the theme setting of the views?

because if that’s how it should work, it’s not working for me. I will always get the default theme.

thanks

Removed as i figured it out.

Popups also have stopped working for me too :frowning:

Hello everyone,

after the new update I have problems with the custom-card “Waste collection”. It’s not showing anymore in frontend. I really don’t know what the problem is, because the code seems to be fine, also after the breaking changes.
Can someone help me?

In my testing I found that icon_tap_action just doesn’t work. No matter what you change it to it always just opens more info. All the other custom actions work just fine.

I opened an issues for it on the GitHub page https://github.com/UI-Lovelace-Minimalist/UI/issues/826

1 Like

Solved Thanks.

I have a chips that shows the number of all lights/switches that are ‘on’.
I would like to have an popup when clicking on it which shows all these devices, how do i do this?

Hello I just used sisimomo printer card but is not working for me.

        - type: "custom:button-card"
          template: "custom_card_sisimomo_printer"
          entity: binary_sensor.hp_printer_connectivity
          variables:
            printer_name: HP 6432
            cartridges:
              - label: "B"
                entity: sensor.hp_printer_inkcartridge_black
                color: "black"
              - label: "C"
                entity: sensor.hp_printer_inkcartridge_cyanmagentayellow
                color: "rgba(var(--color-yellow), 1)"
              - label: "A"
                entity: "70"
                color: "green"

and what returns is;

I dont understand why as I am using with those same sensors the printer card and works well…

Thank you for any tip you can give me as I am a bit noob XD

any help would be really appreciated please