home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.27k stars 629 forks source link

Support for Home Assistant (MDI) icons in template widgets #4135

Open mthmulders opened 8 months ago

mthmulders commented 8 months ago

Is your feature request related to a problem? Please describe. I would like to have a compact widget on my homescreen, with as much information as possible. Now, I "lose" quite some real estate because of text (labels).

Describe the solution you'd like I feel it might be nice if we could include icons in the home screen widget, e.g. using <ha-icon icon="mdi:{{ states('sensor.weather_icon') }}"></ha-icon>.

Describe alternatives you've considered, if any A larger widget - eventually, the screen size of the phone is finite :-).

Additional context

jpelgrom commented 8 months ago

Just to clarify: are you talking about the template widget, and/or other widgets?

If so, there is already a very similar request for Wear OS: #3702 (though technically the tile is quite different so not a duplicate). Also something you may not have considered: you can also use emoji in the template tile.

mthmulders commented 8 months ago

Ah, good question! I meant the template widget, where I can create some HTML and have it rendered on the home screen.

Also something you may not have considered: you can also use emoji in the template tile.

Didn't consider that one indeed, as I wasn't aware of the possibility. It could be of partial help, but I guess that having the same icons as elsewhere in Home Assistant provides a more streamlined experience, right?

dunxd commented 2 months ago

Also interested in this. Emojis are a sort of workaround, but the design is often not nice. It would be nice if the template tile supported the ha-icon tag like the markdown card. <ha-icon icon="mdi:home-assistant"></ha-icon>

Lesquishy commented 2 months ago

I'm all for this. Aside from Emojis, has anyone found a 3rd party app or workaround for this? Would love a mini info dashboard on my home screen so I don't have to open the app.

dunxd commented 2 months ago

The MDI icons assigned to entities are already shown in the Shortcuts tile, so it is possible to display them in a tile.

DJ-CrossFade commented 2 months ago

Just to clarify: are you talking about the template widget, and/or other widgets?

If so, there is already a very similar request for Wear OS: #3702 (though technically the tile is quite different so not a duplicate). Also something you may not have considered: you can also use emoji in the template tile.

Actually I think what he's asking for what be great on the service call widget as well. If we could template the icon on the service call widget so the icon can follow a state that would be phenomenal.

dshokouhi commented 2 months ago

Actually I think what he's asking for

the OP already answered that in https://github.com/home-assistant/android/issues/4135#issuecomment-1891039234

for your other request (which is unrelated to this one) I thnk you want to follow #1013