Skip to content

Add ability to select an Icon via Entities Card Editor UI#8804

Closed
ZephireNZ wants to merge 3 commits intohome-assistant:devfrom
ZephireNZ:entities-icon
Closed

Add ability to select an Icon via Entities Card Editor UI#8804
ZephireNZ wants to merge 3 commits intohome-assistant:devfrom
ZephireNZ:entities-icon

Conversation

@ZephireNZ
Copy link
Copy Markdown
Contributor

@ZephireNZ ZephireNZ commented Apr 2, 2021

Proposed change

This adds ability to specify an icon in the editor UI for the Entities Card, previously it was only available via the YAML.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

N/A

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@spacegaier
Copy link
Copy Markdown
Member

Can you please add a screenshot of how the editor now looks?

@bramkragten
Copy link
Copy Markdown
Member

I don't think this should be in our UI editor, I'm ok with adding it to the struct, so the UI can still be used when you use this option, but not every option has to be in the UI editor.

@ZephireNZ
Copy link
Copy Markdown
Contributor Author

This is what the change I made looks like:

image

Other cards like Entity/Sensor have got pickers for the icon (albeit, that is to override the entity's own icon), so there's some precedent for allowing editing of the icon in the UI.

Happy to change this to just be the struct though, if that's the decision made 😊

@spacegaier
Copy link
Copy Markdown
Member

I like having the icon in the UI editor since icon is a rather helpful UI option and to be consistent with many/most other editors.

If we end up not adding it, then as Bram said we should at least allow icon in the struct check so that we do not prevent the visual editor usage. I hate that the editor becomes unusable by something as trivial as the icon.

@genebean
Copy link
Copy Markdown

+1 to icon editing in the UI

@ZephireNZ ZephireNZ mentioned this pull request May 19, 2021
9 tasks
@ZephireNZ
Copy link
Copy Markdown
Contributor Author

Now that the schema issue is fixed, @bramkragten can I ask, respectfully, why you think that we should not include the icon in the config?

For reference, the below are the cards with a override-able icon, and whether that is configurable in the UI:

Card UI Comment
Button ✔️
Entity ✔️
Light ✔️
Sensor ✔️
Entities
Gauge but also seems this is not visible when manually added?
Glance but neither is any other per-entity config

Based on the above, Entities sticks out as the exception to the rule.

Perhaps this is a larger discussion - for example, maybe we need to have some UI options hidden unless you are in Advanced Mode. Happy to start a thread in architecture for that.

@spacegaier
Copy link
Copy Markdown
Member

I am also in favor of adding it tot he UI editor since I do think it is useful and provides consistency.

Reg. gauges: I have an open PR to add icon support to that card itself (not sure about editor support, but that is easily done if we decide on that). Need to revisit PR, since we reverted it back last time as there were some visual issues.

@bramkragten
Copy link
Copy Markdown
Member

bramkragten commented Jun 3, 2021

For the cards you mentioned there, they are all for 1 entity, and the icon is a main part of the UI for those, the icon you want to add is for the entire card, a group of entities, we have never done that before, and personally, I just don't like it, and might even be confusing.

We try to keep our editors simple, so people are not overwhelmed with options when creating one. The most important part of an entities card are the entities, and those are now put even lower because of the add field at the top of the editor

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 1, 2021

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 1, 2021
@github-actions github-actions bot closed this Sep 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants