-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add entities via labels to entities card #25438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
I tried to do something similar by creating sections strategies : #24607 |
I think it would be somewhat tricky to come up with a one-size-fits-all selector that could work for any type of card, given that the things we select need to be munged in a list with other items that vary based on the type of card (entities card has entities and labels intermixed with other special row types), and each selected item may or may not need its own submenu to configure properties that may differ from card to card. As (and if) we keep expanding labels to more use cases, I would just focus on making sure there are at least good helper functions that minimize the overhead, but I don't think of a good UI design that can handle all that special behavior. Even for now this is just a yaml-only thing, but might revisit UI improvements if this is favorable. |
I do think this could/should use the same syntax as the That way we dont have to re-invent the wheel. Also, if we are going forward with this, we also need to update the size logic of the entities card, as now every item in I wonder if we should instead add |
Not sure how that maps to entities-card syntax exactly. Something more like this?
|
yes, exactly that Funny thing is, we had something like this at the beginning of Lovelace, and we then decided to remove it 🙃 |
I thought perhaps we would just ignore it. I thought size was only determined directly from the config, without |
Maybe we should, as it is only for the masonry view... |
Renamed and replaced |
Proposed change
Add a new row type (
type: label
type: filter
) to entities card, by which a label is auto-expanded to draw a row per entity with that label.I also considered other approach like using a target selector instead, but that didn't seem like a natural fit for entities card with its plethora of other custom row types.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: