android icon indicating copy to clipboard operation
android copied to clipboard

WearOS: Add app activities to ShortcutsTile

Open RoboMagus opened this issue 1 year ago • 6 comments

Summary

This adds the option to add buttons to launch either the Companion app, or the Assist dialog to the ShortcutsTile. See #4550

Screenshots

Shortcut tile with newly added buttons; ShortcutTile

Config for this example; ShortcutTileConfig

New button options are added at the bottom of the entity selection list under the shortcuts section; ShortcutActivityOptions

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

  1. This implementation has been tested only on an AndroidStudio emulator.
  2. It seems that the HA Icon included in the CommunityMaterial.Icon library has not yet been updated.
  3. I'm not fluent in Kotlin / Android app development, so if there's any improvements to be made I'm happy to learn :)

RoboMagus avatar Aug 05 '24 20:08 RoboMagus

  • It seems that the HA Icon included in the CommunityMaterial.Icon library has not yet been updated.

Yea I am not sure it will be acceptable to include the old branding there 🤔

dshokouhi avatar Aug 08 '24 17:08 dshokouhi

  • It seems that the HA Icon included in the CommunityMaterial.Icon library has not yet been updated.

Yea I am not sure it will be acceptable to include the old branding there 🤔

MDI is dropping brand icons in the next major release so probably not open to updating, so I think the way forward is to load the icon from the app's resources in this specific case.

jpelgrom avatar Aug 08 '24 17:08 jpelgrom

Yea I am not sure it will be acceptable to include the old branding there 🤔

Well, any entities inside HA that have its icon set to mdi:home-assistant will still show the old icon too. So this would best be addressed at the icon library side.

RoboMagus avatar Aug 08 '24 19:08 RoboMagus

Yea I am not sure it will be acceptable to include the old branding there 🤔

Well, any entities inside HA that have its icon set to mdi:home-assistant will still show the old icon too. So this would best be addressed at the icon library side.

Yea for any entities a user has defined is fine, but since we are creating this entry it should use the appropriate icon

dshokouhi avatar Aug 09 '24 15:08 dshokouhi

If you agree with this approach I'd prefer looking into creating a separate PR which would patch any use of mdi:home-assistant to be in line with what would be shown on the web version of the HA instance for consistency across platforms. That way any use of the HA icon would be using the new icon instead of the old one.

EDIT: See PR #4587

RoboMagus avatar Aug 18 '24 10:08 RoboMagus

Changing this to draft while waiting for the other PR

jpelgrom avatar Sep 11 '24 16:09 jpelgrom