Help with config-template-card need

Hi, I took this example from a working config, and it gives me an error, but I can’t understand why. Maybe someone will explain where the error is?

I suspect that the error lies in

            - type: 'custom:config-template-card'
              card:

Because I can’t find card in mini-graph-card module

lovelace:

      - id: hassio_status
        type: custom:config-template-card
        variables:
          - states['sensor.current_version'].state
          - states['sensor.disk_use_total'].state
          - states['sensor.disk_use_home'].state
        entities:
          - sensor.current_version
          - sensor.disk_free_home
          - sensor.disk_use_home
        card:
          type: 'custom:hui-entities-card'
          show_header_toggle: off
          entities:
            - type: section
              label: "${ 'NUC --- Debian Buster 10.1 --- HA ' + vars[0] }"
            - type: 'custom:config-template-card'
              card:
                type: vertical-stack
                cards:
                  - type: horizontal-stack
                    cards:
                      - type: picture
                        image: /local/images/devices/nuc_5.png
                      - type: 'custom:button-card'
                        layout: icon_name_state2nd
                        show_icon: true
                        show_state: true
                        entity: sensor.nuc_uptime
                        name: Uptime
                        icon: 'mdi:clock-outline'
                  - type: 'custom:bar-card'
                    title_position: inside
                    show_icon: true
                    entity: sensor.disk_use_percent_home
                    title: "${ 'Disk (' + vars[2] + 'Gb/' + vars[1] + 'Gb)' }"

Error:

No entities defined
type: 'custom:config-template-card'
card:
  type: vertical-stack
  cards:
    - type: horizontal-stack
      cards:
        - type: picture
          image: /local/images/devices/nuc_5.png
        - type: 'custom:button-card'
          layout: icon_name_state2nd
          show_icon: true
          show_state: true
          entity: sensor.nuc_uptime
          name: Uptime
          icon: 'mdi:clock-outline'
    - type: 'custom:bar-card'
      title_position: inside
      show_icon: true
      entity: sensor.disk_use_percent_home
      title: Disk (10.6Gb/19.2Gb)

That looks like my old card… almost verbatim.

The error is coming from hui-entities-card. Are you using entities cards in your interface in other areas?

Yes, Petro, it’s your old config :slight_smile: I’m trying repeat it for study. But not understanding - why error. I also thought about error in hui. This very old way?

There could be a number of reasons why you’re getting the error. Lets start by answering this question

Not using.

Then you need to use the custom preloader card and load the entities card.

this https://github.com/gadgetchnnel/lovelace-card-preloader/ ?

In start of ui-lovelace:

preload_cards:
  - horizontal-stack
  - vertical-stack
  - entities
  - markdown

preload_rows:
  - sensor-entity

yep, you need to preload entities card if you use custom:hui-entities-card

Now, try to understand, how do it :slight_smile:

Does not work. preload_cars ignored all ‘custom:’ strings

preload_cards:
  - horizontal-stack
  - vertical-stack
  - entities
  - markdown
  - custom:hui-entities-card
  - custom:mini-graph-card
  - custom:config-template-card
Preloaded card horizontal-stack lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card vertical-stack lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card entities lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card markdown bar-card.js?v=3.1.6:4825   
BAR-CARD   Version 3.1.6    
lovelace-card-preloader.js?v=0.0.4:1 Uncaught (in promise) TypeError: this.console_error is not a function
    at console.window.console.error (lovelace-card-preloader.js?v=0.0.4:1)
    at s (chunk.6dbb65acb727c33dd251.js:2144)
    at chunk.6dbb65acb727c33dd251.js:2144
    at l (chunk.6dbb65acb727c33dd251.js:2144)
    at Object.Ut [as createCardElement] (chunk.6dbb65acb727c33dd251.js:2144)
    at Object.preloadElement (lovelace-card-preloader.js?v=0.0.4:1)
    at lovelace-card-preloader.js?v=0.0.4:1
    at Array.forEach (<anonymous>)
    at lovelace-card-preloader.js?v=0.0.4:1

hui-entities-card is entities. You don’t need to include the custom cards.

Sorry, Petro, but I don’t understanding what I needs to do…

remove that.

is the same as

Yes, I did this already. I do not understanding what should i do to make it work

Is there a new error? You’re not giving me any information other than what you are trying…

No, errors the same. But preload is works

No entities defined
type: 'custom:config-template-card'
card:
  type: vertical-stack
  cards:
    - type: horizontal-stack
      cards:
        - type: picture
          image: /local/images/devices/nuc_5.png
        - type: 'custom:button-card'
          layout: icon_name_state2nd
          show_icon: true
          show_state: true
          entity: sensor.nuc_uptime
          name: Uptime
          icon: 'mdi:clock-outline'
    - type: 'custom:bar-card'
      title_position: inside
      show_icon: true
      entity: sensor.disk_use_percent_home
      title: Disk (10.7Gb/19.3Gb)
Preloaded card horizontal-stack
lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card vertical-stack
lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card entities
lovelace-card-preloader.js?v=0.0.4:1 
Preloaded card markdown
lovelace-card-preloader.js?v=0.0.4:1 
Preloaded row sensor-entity

Are there errors in the logs? What about in chrome dev tools?

No in log errors, only on screen and dev tools. On screen like 1st message, dev tools below

chunk.6dbb65acb727c33dd251.js:2144 config-template-card Error: No entities defined
    at HTMLElement.setConfig (config-template-card.js?v=1.2.0:3127)
    at s (chunk.6dbb65acb727c33dd251.js:2144)
    at chunk.6dbb65acb727c33dd251.js:2144
    at l (chunk.6dbb65acb727c33dd251.js:2144)
    at Te (chunk.6dbb65acb727c33dd251.js:2450)
    at HTMLElement.value (chunk.6dbb65acb727c33dd251.js:1257)
    at HTMLElement.e.renderEntity (card-mod.js?v=2:1)
    at chunk.6dbb65acb727c33dd251.js:1191
    at Array.map (<anonymous>)
    at HTMLElement.value (chunk.6dbb65acb727c33dd251.js:1191)

do these entities exist on your system?

Yes, and shows right values.

Card show right before

            - type: 'custom:config-template-card'

I see in header on card:

NUC --- Debian Buster 10.1 --- HA 0.111.2

and then error:

No entities defined
type: 'custom:config-template-card'
card:
  type: vertical-stack
  cards:
    - type: horizontal-stack
      cards:
        - type: picture
          image: /local/images/devices/nuc_5.png
        - type: 'custom:button-card'
          layout: icon_name_state2nd
          show_icon: true
          show_state: true
          entity: sensor.nuc_uptime
          name: Uptime
          icon: 'mdi:clock-outline'
    - type: 'custom:bar-card'
      title_position: inside
      show_icon: true
      entity: sensor.disk_use_percent_home
      title: Disk (11.8Gb/19.2Gb)