home-assistant / android

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

Ability to add additional template tile to WearOS #3291

Closed Bruskey closed 9 months ago

Bruskey commented 1 year ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like It would be handy to be able to add additional template tiles on top of the 1 that can be added now. Is this possible to do? There just isn't much room on the current one to do much more than a couple lines of text.

Describe alternatives you've considered, if any

Additional context Is there also the ability to be able to use MDI icons too?

dshokouhi commented 1 year ago

Is there also the ability to be able to use MDI icons too?

thats not really something that can be supplied via a template, maybe try an emoji?

Bruskey commented 1 year ago

Is there also the ability to be able to use MDI icons too?

thats not really something that can be supplied via a template, maybe try an emoji?

Thanks for the reply. I just tried using emoji's and i reckon that would be a good alternative.

Bruskey commented 1 year ago

Any update on this one? Can this be achieved?

slovdahl commented 1 year ago

I'm also interested in this 👍 So interested that I might even start looking at it.. 🙂 Support for multiple Shortcut tiles was recently implemented in #3697, maybe that can provide some inspiration.

Is there also the ability to be able to use MDI icons too?

Without seeing this, I opened #3702. I use emojis too at the moment, but they are far more limited than MDI icons. And I agree with @dshokouhi, a template will probably not work as templates are rendered server-side by Home Assistant. I suggested an HTML tag could be used in #3702. I even started looking at it, but it seemed a bit hard to solve because IIRC the HTML parsing and rendering is done by some internal Android SDK utility.

dshokouhi commented 1 year ago

So interested that I might even start looking at it.. 🙂

🎉 ❤️

Support for multiple Shortcut tiles was recently implemented in #3697, maybe that can provide some inspiration.

most definitely! some great work done in that PR!

I suggested an HTML tag could be used in #3702. I even started looking at it, but it seemed a bit hard to solve because IIRC the HTML parsing and rendering is done by some internal Android SDK utility.

HTML gets fed through fromHTML() which is very basic formatting. For something like this we may need to pick something that is unique for the app to pick up on. We do have a MDI icon library to help with translating the tag names like we do with notification_icon so that might be helpful?