Input Multiselect for Home Assistant - select multiple options from a single entity!

Hey everyone! :wave:

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: options which’s the full list of things you can choose from and selected_options which 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:

  • :clipboard: Expandable dropdown with checkboxes for each option

  • :white_check_mark: 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.

  • :art: Modern rounded design inspired by Bubble Card

  • :zap: Fast editor with no lag

  • :dart: 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


:rocket: 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


:bulb: 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!

Hey.

Really needed this - thanks. However, I don’t think the actions to add/remove/change_options are working - I tried from a script and from the Developer UI, no errors reported, but also no change to options.

Example of my attempt:

action: input_multiselect.set_options
target:
  entity_id: input_multiselect.gamer_application_whitelist
data:
  options:
    - Bla
    - Blu

Am I missing something?

Regards,
Matjaz

Hi @Matjaz,

Thanks for reaching out and reporting this! You’re totally right—there was a logic bug in version 1.0.0 and the services were not working correctly.

The integration was mistakenly adding/removing options only from the internal active selection array instead of the global options pool. Furthermore, due to how Home Assistant caches the memory dictionary of attributes behind the scenes, mutating lists in-place was preventing the custom card UI from updating dynamically.

Great news though: I have just released v1.1.2 which completely fixes this.

The services should now work:

  • add_options: dynamically concatenates new options to the one alreadyconfigured.
  • remove_options: deletes options from the options.
  • set_options: completely overwrites the options with a new set.

Just search for the update in HACS.

Let me know if it works!

If you run into any other issues, feel free to open an issue on github repo!

Best,
D.

EDIT: I made several updates to both the backend and the frontend module, let me know if you have any issue!