piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: Add mdi:icon selector to template

Spookster opened this issue · comments

Is your feature request related to a problem?

Love the cards, but a very small annoyance is not being able to search (or select) a mdi:icon from the 'template card' interface.
I understand the reasoning for it, as with a template we need to keep it dynamic.
However, it just means an extra couple of steps to locate a suitable icon to use when designing.

image

Describe the solution you'd like

A solution could be to just offer an (additional) search box within the interface to help locate, cut and paste a mdi:icon to the actual icon field
It would have to be clearly marked as such so that people dont assume thats the selected icon

image

Describe alternatives you've considered

The alternatives are to search from a different card interface or from the material designs home page.
I believe having this inside the interface would simplify the process

Additional context

No response

Hi
If this is done, we lose all the interest of the template_card. We couldn't write this any more:

icon: >-
      {{ iif(is_state('input_boolean.steve_sleep', 'on'), 'mdi:sleep',
      iif(is_state('person.steve', 'home'), 'mdi:home', 'mdi:home-off'))

"A solution could be to just offer an (additional) search box within the interface to help locate, cut and paste a mdi:icon to the actual icon field"

I think it is better to open an issue in the homeassistant frontend repository and request to modify the template editor (added with version 2022.5), so that it also completes the names of the icons, perhaps recognizing mdi:.

Knowing that @frenck hangs out on this repository, and that it was he who gave us the template editor, maybe there is a chance that he will be the one to carry out this change.

Mdi icon auto completion on editors would be a great feature! But yeah, that is an upstream feature request

that's majestic.

I cant leave a heart emoji big enough :)

Can we close this issue as fixed in upstream, or does the template editor UI still need to implement this feature?

It will be automatically fixed with the 2022.7 HA version. So we can close it 🙂