[SOLVED] Lovelace conf with custom cards, error No card type configured

Hello,

I want to personnalise my lovelace UI with some custom cards that I downloaded with HACS.

In my configuration.yalm, I have:

lovelace:
  mode: yaml
  resources:
  - url: /hacsfiles/logbook-card/logbook-card.js
    type: module
  - url: /hacsfiles/bignumber-card/bignumber-card.js
    type: module

In my ui-lovelace.yalm:

title: Maison

views:
  - badges:
      - entity: person.maxime
      - entity: sun.sun
    cards:
      - entities:
          - entity: sensor.toulouse_next_rain
          - entity: sensor.toulouse_rain_chance
          - entity: sensor.toulouse_weather
        type: glance
  
      - entities:
            type: custom:logbook-card
            desc: true
            entity: sun.sun
            hiddenState:
                - above_horizon
            title: Day history
    path: default_view
    title: Home

In the lovelace view, the regular cards show up nicely but the custom cards is red with the following message:

No card type configured.
entities:
  type: 'custom:logbook-card'
  desc: true
  entity: sun.sun
  hiddenState:
    - above_horizon
  title: Day history

I don’t know where is my error…
Thank for your help.

Maxime

Edit : I’m using Home Assistante with HASSIO on Raspberry Pi 3. HA version 0.107.6

2 Likes

OK, I just find my mistake. It was an identation problem in ui-lovelace.yalm

this is better:

title: Maison

views:
  - badges:
      - entity: person.maxime
      - entity: sun.sun
    cards:
      - entities:
          - entity: sensor.toulouse_next_rain
          - entity: sensor.toulouse_rain_chance
          - entity: sensor.toulouse_weather
        type: glance
  
      - entities:
        type: 'custom:logbook-card'
        desc: true
        entity: sun.sun
        hiddenState:
          - above_horizon
        title: Day history
    path: default_view
    title: Home

2 Likes

This helped me figure out what I was doing wrong.

I was using the UI to add a manual card, I thought I just needed to copy/paste the example code from the GitHub readme’s but was getting that same ‘no card type configured’ errors. I had to delete all the indents and get the code to line up right up against the left side of the UI’s text box.

I was pasting in the code like this:

- type: "custom:button-card"
  entity: switch.ac
  icon: mdi:air-conditioner
  color: rgb(28, 128, 199)

When it should’ve been like this…

type: "custom:button-card"
entity: switch.ac
icon: mdi:air-conditioner
color: rgb(28, 128, 199)

it’s crazy what a couple extra spaces mess up!

15 Likes

thank god for this post…

1 Like

I made the same mistake wasting 1 hours
Thank you for posting the solution

I had the same, but if i do it right the example is OK but i can not press the save button

Don’t know why not a single HACS frontend dev mentions this, I wasted two hours on this, finally your post helped

1 Like

:raised_hand: Same here, starting to test with custom cards, crazy with official documentation not working …

Official lovelace-custom-card → Referencing your new card

Your post save my day! Thank you!

1 Like

Thanks for this post :smile: Great job

+1 with the others. Saved my sanity!

Spending hours on this stupid mistake…

Thanks for this answer! I found this after a couple of hours pulling my hair out, one ‘-’ in the wrong place ruins everything!