Lovelace: A simple Search card

I have created a simple search card that makes it easy to search for entities and display them in the frontend. I thought that maybe someone else might find it useful, so I decided to publish it. Here’s a small demo:

It’s very basic and I will add new stuff over time. If you have any feature requests feel free to ask (or preferably write an issue on github).

Enjoy!

32 Likes

Very nice!, future request? hmm… select items then “convert to card” ? haha, that might be overkill.

2 Likes

Great, I was expecting something like this.
will try it for sure, thanks!

This is really great!
Thanks for putting it together and sharing.

Thank you for this great card. Just implemented it, makes things so much easier.

What is the card you have underneath it (house, temperature, etc.)?

Thanks! Great that you found it useful :slight_smile:

It’s another card I’ve made called Home Card, you can find the post about it here:

1 Like

BEST. CARD. EVER. Especially if you have over 300 entities…

Looking forward to the exclusions of domains and entities!

I just made a lot of updates so it should render a lot more nicely now (especially with default theme). Also, basic support for custom actions. So you can for instance type “toggle light.downstairs” and get a button that calls that entity. A default action is added so you can paste a .torrent or magnet: link and it will produce a button that adds it to Transmission. Assuming you have configured Transmission.

1 Like

This was working for me, and now it’s not. I get this error:

Can't find card-tools. See https://github.com/thomasloven/lovelace-card-tools
{
  "type": "custom:search-card",
  "max_results": 10
}

You need to install card-tools, just follow the link.

@postlund Any plans for an update? Would be great to be able to exclude domains/entities from the search.

There will be updates in due time, but I’m putting all my efforts into fixing Apple TV support. After that I will work more on this card. But PRs are welcome!

1 Like

Ok thanks for your answer. I’ll look into the code when I have time :wink:

Feel free to do so, it’s terrible :wink:

I got the same error as scfigg, but i have card tools installed (HACS)…

Any idea how to fix this?

 Uncaught TypeError: Failed to resolve module specifier "card-tools/src/templates.js". Relative references must start with either "/", "./", or "../".

@postlund My man. You have created my favorite custom card! It’s so useful. Thanks for the great work.

1 Like

Idiot newbie question. I try to install this card. Added:

resources:

  • url: /local/search-card/search-card.js?v=0
    type: module

in the card configuration, and then get:

undefined is not an object (evaluating ‘this._configElement.setConfig’)

On the right side of the box, I get:

No card type found
resources:

  • url: /local/search-card/search-card.js?v=0
    type: module

Can anyone tell this fool what he is missing or has done wrong. I did install in HACS and it does show up there.

By the way, there is no gap between the resources and url lines - this just appeared from the cut and paste

Do you have cardtools installed as well?

I did not have cardtools installed before but think I do now
Tried to reinstall the search card but same result. The repository says under the simple install to copy the .js file to config/www/search-card, but in my case it seems to automatically get created in config/www/community/search-card/
Is that possibly causing a problem?
I do seem to be very confused about what (if anything) needs to be added to the raw Lovelace config file, and what seems to be sone automatically.