A different take on designing a Lovelace UI

old custom:hui-markdown-card, needs lovelace-card-preloader, with class from themes.yaml.

          - type: custom:hui-markdown-card
            class: sidebar
            style:
              {top: 9%, left: 11.1%}
            content: >
              <span>{{ states('sensor.time') }}</span>

main picture-elements style with card-mod

      - type: picture-elements
        image: /local/background.png
        style:
          "#root > hui-markdown-card, #key1":
            $: |
              ha-card > ha-markdown {padding: 0 !important;}

          "#root > hui-markdown-card, #key2":
            $:
              "ha-card > ha-markdown":
                $: |
                  ha-markdown-element > p > span {font-family: SF Text; font-size: 5vw; 
                  font-weight: 200; margin-left: -0.3vw; letter-spacing: -0.05vw;}

custom:hui-element placed anywhere to fix load problem

          - type: custom:hui-element
            card_type: markdown
            style: {opacity: 0}
            content: preload

reference ui-lovelace.yaml

Amazing, thank you so much.

Thanks for sharing… :partying_face:
Mattias Persson … worse than covid! :test_tube:
(worse than a virus. You are contagious!)
Me too like everyone here … i’m learning basic swedish :sweat_smile: :rofl:

So I’m getting somewhere, after quite some weeks of work. My main layout is sort of done. Tweaking of alignment will follow when I debug on my tablet. I do need to work on the pop-ups now and update some code I fear, since I started with the older code where styles became broken due to home-assistant updates.

image

I still have an issue with markdown cards, that give errors the first time I load the page. After a refresh all is fine. I assume it has something to do with the preload stuff. So according to Mattias’ post a few posts above, should I change the custom:hui-markdown-card to custom:hui-element & card_type: markdown? That means reworking those cards I fear? And I still see both types of these cards in Mattias’ code.

image

Yes, that’s exactly what you need to do. You should get rid of the custom:hui-markdown-card method, it’s very hacky and chances are you’ll run into issues with later HA versions.

I tried it myself and simply rewritten one by replacing custom:hui-markdown-card with:

type: 'custom:hui-element'
card_type: markdown

Strangely, I only changed one of the multiple custom:hui-markdown-card I have (to test if it works), but the errors disappeared all together of all markdowns.

No

@Mattias_Persson

Hello again,
after updating browser_mod, popups start looking different.
Is there a quick fix beside reverting browser_mode to older version?
Thanks


before

style it from themes.yaml, search mine for card-mod-more-info-yaml

Thanks for your help.
I copied the theme from your config and remove popups style and now the browser_mod popups are looking ok.
I have an issue with the regular more info popups, they have a transparent background when I use this theme.
Can you advice where to look into fix it.

Didn’t think of that, this commit should fix it

If you have a popup with multiple cards and don’t want a background

1 Like

That did the trick :slight_smile: :+1: and you are right just when are multiple screens in popup the background needs to be transparent (none).
Thanks again for your help.

I am running into style issues and have no clue how to fix them. Can anybody give me a hint? The popup is really messed up

me too :joy:

Hello buddy! Great job!

I’m trying to play a sound when I click a button but I haven’t found much information. Could you show me the way?

I’m in the final tweaking phase :slight_smile:
Just wondering, what are these “prefix” header cards about? Can’t find any reference about them. And can I add an icon to it?

Thanks!

@DekiEE You’ll have to provide more info


@gabrielmiranda Search ui-lovelace.yaml or automation.yaml for ui_sound


@spudje a-different-take-on-designing-a-lovelace-ui/162594/224

I can’t get the Popup backdrop filter to work anymore. I can’t find that they changed anything, anyone got it to work in full kiosk browser?

Thanks, @Mattias_Persson, I will take a look at card-mod then

The popup is squeezed to the center of the screen as you see in the Screenshot. I don’t know what configuration to change. I tried to change the width but it seems like any change to the style block has any effect on the popup.