Allow area, device, and entity selectors to optionally support multiple selections like target selector#11059
Allow area, device, and entity selectors to optionally support multiple selections like target selector#11059r-t-s wants to merge 1 commit intohome-assistant:devfrom
Conversation
…le selections like the target selector
| return html``; | ||
| } | ||
| return html` | ||
| <div class="mdc-chip-set items"> |
There was a problem hiding this comment.
this code needs to be generalized. This is now copy pasted 3 times?
I think it might benefit it we start with a single selector in this PR instead of trying to do entity, device and areas in one PR.
There was a problem hiding this comment.
How about a single selector file with a common base class and 4 specializations (Target, Area, Device, Entity) ?
Then we have the existing Area, Device and Entity pickers that are called from the selectors.
|
When I noticed the merge conflicts I also noticed that much of the work of this PULL request has already been completed. |
|
PRobably be easier to start from scratch with the new code. This is something we want to do eventually so if you would like to do these one at a time then that would be great! |
|
So one thing we have been considering (but didn't get to) is to unify the look of targets, area, device and entity picker to all look like targets. That would be something to pursue. |
Proposed change
Changes to the Area, Device, and Entity selectors to allow them to select multiple entities.
The user interface is similar to the Area, Device and Entity selector component of the target selector.
Single or multi select is configured with the optional multiple option on the selector configuration.
The selectors can now potentially return a list of area, device, or entity IDs.
This is motivated by the need to have multiple entity selector so a blueprint can trigger on multiple entities.
But brings a consistent UI for the Area, Device, Entity, and Target selector.
Type of change
Example configuration
Additional information
Associated core PR #63138
Checklist
If user exposed functionality or configuration variables are added/changed: