Hey everyone! ![]()
I am happy to share something I have been working on: Input Multiselect. A backend integration and a Lovelace card that together bring multi- functionality to Home Assistant.
If you have ever felt frustrated that the input select feature only allows you to choose one option at a time then this is something for you. Think about it the input select feature is very limited. For example what if you want to decide which rooms your robot vacuum should clean?. What if you want to group your media players together?. Maybe you want to pick the weekdays for an automation to run. The input select feature is not very helpful, in these situations. The input select feature only lets you pick one option at a time.
1. Input Multiselect — Backend Integration
A custom integration is available that adds a type of helper entity called input_multiselect. This input_multiselect entity is set up completely from the user interface so you do not need to use YAML. The input_multiselect entity works in a way:
-
State is used to show how items you have chosen like it will say
2 selected. This is important because it keeps the information short and, under the 255 character limit that Home Assistant has. -
Attributes are made up of two things:
optionswhich’s the full list of things you can choose from andselected_optionswhich shows you what you have currently chosen. -
There are three actions that you can use when you are writing scripts and setting up automations:
| Action | What The Action Does |
|:—|:—|
| input_multiselect.set_options | Change the selection to something new |
| input_multiselect.add_options | You can add items to the things you have already chosen |
| input_multiselect.remove_options | Remove items from the current selection |
2. Input Multiselect Card — Lovelace Frontend
This special Lovelace card is really useful because it gives you an simple user interface, for these things:
-
Expandable dropdown with checkboxes for each option -
The Smart SUBMIT button is really useful because it only works when you have actually made a change to your selection. This means the Smart SUBMIT button* will not do anything until you have chosen something different. The Smart SUBMIT button is only activated when it notices that your selection is not the same as it was before. -
Modern rounded design inspired by Bubble Card -
Fast editor with no lag -
Standard HA action selector — configure an optional action to fire after submit (navigate, call a service, more-info…), just like Mushroom and other premium cards
Quick start
1. Install the backend. To do this you need to go to HACS then click on Integrations click on Custom repo and finally paste the integration URL. This is how you install the backend.
2. Create an entity (Settings → Integrations → Add → “Input Multiselect” → give it a name and options)
3. Install the card (HACS → Frontend → Custom repo → paste the card URL)
4. Add it to your dashboard:
type: custom:input-multiselect-card
entity: input_multiselect.rooms_to_clean
name: Cleaning Zones
icon: mdi:robot-vacuum
tap_action:
I want to navigate to a place. The action I am taking is to navigate. Navigation is what I need to do now. I will take the action to navigate.
navigation_path: /lovelace/cleaning
Use it in automations
When your entity has made the choice you can simply look at the selected_options in your templates:
action: input_multiselect.add_options
target:
entity_id: input_multiselect.rooms_to_clean
data:
options:
- Kitchen
- Hallway
Both repositories are available on HACS as custom repositories. I want to know what you think about the repositories. Do you have any ideas or suggestions, for the repositories? If you do you can tell me by opening an issue on GitHub. You can just leave a comment here about the HACS repositories.
Best!