A Lovelace card for Home Assistant that enables quick entity searching with customizable actions.
- 🔍 Quick entity search within the Home Assistant frontend
- ⚡ Custom actions with regex-based matching
- 🎯 Domain filtering (include/exclude specific domains)
- 📋 Configurable result limits and placeholder text
- Home Assistant
- card-tools
- Search for "Search Card" in the HACS store
- Install and follow the HACS prompts
- Download
search-card.js
- Copy it to
config/www/search-card/
(create directory if needed) - Add to
ui-lovelace.yaml
:
resources:
- url: /local/search-card/search-card.js?v=0
type: module
# Clone into your www directory
git clone https://github.com/postlund/search-card.git
Then add the same resource reference as in Manual Install.
type: custom:search-card
max_results: 10
search_text: "Search entities..."
excluded_domains:
- automation
Name | Type | Default | Description |
---|---|---|---|
max_results | integer | 10 | Maximum number of search results to display |
search_text | string | "Type to search..." | Custom placeholder text |
actions | object | optional | Custom action definitions |
included_domains | string[] | optional | Only show entities from these domains* |
excluded_domains | string[] | optional | Hide entities from these domains* |
*Note: included_domains
and excluded_domains
cannot be used together
The card supports filtering entities by their domains using either included_domains
or excluded_domains
.
light
- Light entitiesswitch
- Switch entitiessensor
- Sensor entitiesbinary_sensor
- Binary sensor entitiesclimate
- Climate control entitiesmedia_player
- Media player entitiesautomation
- Automation entitiesscript
- Script entitiescamera
- Camera entitiescover
- Cover/blind/garage door entities
Include only lights and switches:
type: custom:search-card
included_domains:
- light
- switch
Exclude automation and script entities:
type: custom:search-card
excluded_domains:
- automation
- script
Note: The card will show entities from all available domains in your Home Assistant instance unless you specify domain filters.
Actions allow you to define service calls triggered by regex matches. Example:
type: custom:search-card
actions:
- matches: '^toggle (.+\..+)'
name: "Toggle {1}"
service: homeassistant.toggle
service_data:
entity_id: { 1 }
If you encounter issues:
- Clear browser cache
- Restart Home Assistant
- Verify card-tools is properly installed
- Check your configuration syntax
For bug reports, please create an issue with:
- Your configuration
- Home Assistant version
- Browser and version
- Error messages (if any)
Planned features:
- Entity exclusion list
- "Show all" results button
- Additional action types