-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Currently the Lovelace card editors do not prevent adding duplicate entities to a card, nor do they warn the user when this happens. This applies to the following cards: Entity, Glance, History Graph, Map.
Here's a scenario - someone has three dozen lights inside of an Entity card titled "My Lights" and then they want to add two brand new lights to that card. So they edit the card, but instead of seeing just their two new lights they see 38 lights that can be added, even though 36 exist in the card already! Now the user has to hunt for a needle in a haystack to find two lights.
For comparison, the Person editor prevents things like this. After you add a device tracker to a person, it's gone from the entity dropdown list. Dropdown list will only show devices that have not been assigned to that user.
I think same behavior as Person would make sense here. I don't see the use case for wanting to add a duplicate entity to a Lovelace card. It would make more sense to filter out already added entities.
Another option would be to maybe show already added entities in a "disabled" state in the dropdown list. That would allow to easily distinguish between added/not added.
Another possible option would be to allow the user to add a dupe (just like today) but show a warning afterwards, like so:
