home-assistant / android

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

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

Open mthmulders opened 10 months ago

mthmulders commented 10 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 10 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 10 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 4 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 4 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 4 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 3 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 3 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

dreimer1986 commented 3 weeks ago

Regardless if template or entity state widget, I have a nice example for a use case here.

Before I used Nightscout on my NAS and xDrip on my phone to track my blood sugar values. xDrip connected to LibreView and passed it to Nightscout for a way to get it into HA. On my watch I had the companion app or xDrip itself to show the values on my watch face, both with value and trend as symbol.

Recently I added Freestyle LibreLink as custom component to Home Assistant and show my blood sugar value on my watch and phone by widget now. As already mentioned on watch I have the entity icon which shows an arrow with the trend of my value, so a perfect and way silmpler replacement for this monstrosity I used before.

On Android this seems to not work, but really would be a nice to have. Even better would be a lil diagram as widget or notification as xDrip was able to, but this is nothing for this report here. The symbol alone would be a real milestone to use the widget for this purpose.