Lovelace Card Preloader

Hi, can you tell me why the “alarm-panel” cards don’t work?

Unknown type encountered: alarm-panel.

this is the code:

preload_cards:
  - picture-entity
  - picture-elements
  - alarm-panel

- entity: alarm_control_panel.home_alarm
  name: Allarme
  states:
     - arm_away 
  type: alarm-panel

thank you very much

Where exactly do you have that in your Lovelace config? It isn’t valid on its own and it depends on where you are using it.

If you are trying to use alarm-panel as a type within an entities card it should be referred to as ‘custom:hui-alarm-panel-card’, like this:

type: entities
entities:
  - entity: alarm_control_panel.home_alarm
    type: 'custom:hui-alarm-panel-card'
    name: Allarme
    states:
      - arm_away

I’m using home assistant core 0.107.6 and I have two errors:
“Custom element doesn’t exist: config-template-card” and “Custom element doesn’t exist: bar-card”.

I have this:

preload_cards:
  - custom:bar-card
  - custom:config-template-card

into the configuration file of lovelace view.

How can I solve this issue?

EDIT: I put the preload_cards configuration also into the dashboard config file but I’ve the same error.
EDIT 2 : Solved - There was a typo error into the declaration of resources in yaml file.

Hi, I’m trying to put the custom cards color-lite-card. and I don’t get it. I am very new to this, could you explain what should I do? Because I’m not getting it, much more than I try.
Thank you

Anyone tried preloading shopping-card (hui-shopping-list-card)? I believe this is a built-in card; Its not working for me…

ui-lovelace.yaml:

preload_cards:
  - markdown
  - gauge
  - shopping-list
preload_rows:
  - divider

I’m using this and it works well for me but I still don’t really understand what is going on.

The only card I had that was causing a problem was a hui-markdown-card when inside a picture-elements card and in some cases when it was used a popup.

The thing is, on my desktop PC it wasn’t a problem at all in the case of the use inside the picture-elements but was with some popups.

On my cheap Chinese tablet (running Android 9) it seemed to be a problem in all cases.

If there is a deep technical reason why this is so, then maybe I don’t need to know but if not, I am very curious about what is going on.

Thanks.

Hi! Great work doing this. Saw a lot of people complaining about the lazy-load feature after 0.107.* upgrade. Thanks for everything! Still not working for me though. I have no custom cards, just a vertical stack with two conditionals that used to work before upgrading to 0.107.7. Right now, everything works as expected after a refresh. If i switch the condition, the other conditional card does not appear, until i press the configure ui button at the top. After that, it works as expected.

So I found this preloader, installed it using HACS, added to resources by pressing the button on the notification pop-up card. Added everything in my mind, trying to make it work in raw configuration editor before anything else:

preload:
  - vertical-stack
  - horizontal-stack
  - entities
  - entity
  - entity-button
  - conditional
  - picture-elements
  - picture-entity

Looking in the console, everything seems fine( i know the ‘preload:’ is deprecated), it shows that all the types are preloaded, no errors at all. Still nothing changes in the behaviour of my setup. Any idea?

cards:
  - card:
      elements:
        - entity: switch.bar_lights
          icon: 'mdi:lightbulb'
          style:
            left: 63%
            top: 30%
          tap_action:
            action: toggle
          type: state-icon
      image: /local/images/Smarthome-parter-alloff.png
      type: picture-elements
    conditions:
      - entity: switch.bar_lights
        state: 'off'
    type: conditional
  - card:
      elements:
        - entity: switch.bar_lights
          icon: 'mdi:lightbulb'
          style:
            left: 63%
            top: 30%
          tap_action:
            action: toggle
          type: state-icon
      image: /local/images/Smarthome-parter-bar.png
      type: picture-elements
    conditions:
      - entity: switch.bar_lights
        state: 'on'
    type: conditional
type: vertical-stack

If this is in a regular vertical-stack card, this isn’t the lazy load issue that my preloader was designed to fix. It actually looks like this issue that was reported as having started in the 0.108 beta, so maybe it actually started in 0.107.7.

1 Like

Thank you! I have posted my problem there. I think I will wait a little, until the next release to see if there’s any improvement on this topic and then I’ll dig more if nothing changes.

I am having an issue with an iframe card. I added it to the list for preload cards however I am still receiving this error:
image

preload_cards:
  - iframe

Is there a way to resolve this?

Due to problem in the doorpi project running a custom card that is not ready for the new custom card version, I have installed this tool. From some reason it has the same issue the doorpi has eg. Custom card doesn’t exists. Any idea?
I am running on Verizon 0.108.6.

Hi @Steven_Rollason, I appear to have a similar issue that this card aims to fix, but I’m having no luck making it work. Do you think it’s due to me using browser_mod to achieve the popup card? I saw that you linked to a conditional card issue earlier, but that looks to have been fixed in 1.108.0 and I’m running 1.108.9.

This is the error:
image

Here is the code I’m using:

resources:
  - url: /hacsfiles/lovelace-card-preloader/lovelace-card-preloader.js
    type: js
 
preload_cards:
  - entity-filter

title: Home
views:
  - title: Test2
    panel: false
    path: test2
    popup_cards:
      input_boolean.window_is_open:
        title: Open Windows
        card:
          type: entity-filter
          state_filter:
            - "Open"
          entities:
            - sensor.win_lounge_top_left
            - sensor.win_lounge_top_right
    cards:
      - type: conditional
        conditions:
          - entity: input_boolean.kiosk_cond_btt1
            state: "on"
        card:
          type: button
          name: Turn Off Lights
          entity: input_boolean.window_is_open
          tap_action:
            action: more-info

Thanks.

after updating the HA stopped working custom:hui-conditional-card

I also seem to have trouble getting it to work. I have added the following to my lovelace config:

preload_cards:
  - button-card
  - mini-media-player
  - mod-card
  - stack-in-card
  - auto-entities
  - simple-weather-card
  - simple-thermostat
  - aarlo-glance
preload_rows:
  - fold-entity-row
  - slider-entity-row

Yet i still get red errors in my Lovelace views from time to time saying failed to load custom cards and forcing me to keep reloading the page until they finally show up. Anything i am doing wrong?

See if this works any better for you:

Is the preloader still needed in 0.118?

Yes, since lazy loading is still used in 0.118. However, you might find that hui-element (linked in the previous comment) is a better solution.

Same question, with the 2021 release is still needed this card?

Just try…

I sometimes have a problem with a swipe card :

Could this preloader card avoid this and if so, how do I have to configure it ?