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

Add a dynamic shortcut for "Assist" to make it easier to bind to hotkeys (power button long-press) on Samsung Phones #3981

Open ChriKn opened 11 months ago

ChriKn commented 11 months ago

Is your feature request related to a problem? Please describe. There seems to be no specific "Assist"- app-action.

Describe the solution you'd like Add a specific "Assist" app-action

Additional context On Samsung Phones you can link a hold of the power-button to bixby. Via a plugin (Good Lock -> Routines +) it's possible to create a "bixby routine" (automation), where holding the power button launches an app or an app-action. Home Assistant doesn't seem to expose a specific Assist app action (or any app action, which you might also get when tap-and-holding the app icon).

This would make Assist way easier to access for daily use, without the need to unlock the phone first.

jpelgrom commented 11 months ago

I do not have a Samsung device, but it sounds like you want a launcher icon or shortcut? I cannot find Samsung developer documentation for this.

Could you try adding an Assist widget/shortcut, or a regular app shortcut, and see if it shows up as an option?

ChriKn commented 11 months ago

I already had that idea, but it's a deeper integration (in the system settings, not only a shortcut / link)

Screenshot_20231029_200341_Modes and Routines

Here is what it looks like. The easiest solution would probably be to use Androids app actions feature (which seems to be where Samsung decided to put the hooks). Thank you for your help !

jpelgrom commented 11 months ago

Which shortcut type did you try? Based on your list it looks like launcher icon + dynamic shortcuts to me.

ChriKn commented 11 months ago

The list is given to me by Samsungs "Bixby Routines" and the Routines+ plugin. It shows app specific content (I believe it depends on what each app developer has opened up as an "app actions").

I just tried to add a shortcut using home assistants custom shortcut (in the app) and it shows up. So a shortcut to the Assist functionality would be enough (but I can't create one.... Is there a way for me to create an entity which would launch the Assist overlay ?

jpelgrom commented 11 months ago

You can append ?conversation=1 to a dashboard path to launch Assist, so for example create a shortcut with /lovelace/0?conversation=1. (That doesn't only launch Assist but also loads the dashboard.)

The issue is that it's hard to add a new shortcut type here without breaking existing use cases 🤔

jlatvala commented 10 months ago

Little bit relatd to this feature request so I didn't create new...

On Samsung phones (at least Galaxy S22) you can add two app shortcuts to the lock screen (bottom corners). I would like to have a possibility to launch Assist using those shortcuts. If there would be a normal Assist app, I could add it into these lock screen shortcuts.

I know you can add Assist app icon (shortcut) to the launcher using a widget, but you can't use the same approach to add Assist app onto lock screen on Samsung phones.

So requesting to have a normal Assist app (not only Assist shortcut widget) for lock screen to make it possible to launch Assist also from Samsung's lock screen.

dshokouhi commented 10 months ago

I know you can add Assist app icon (shortcut) to the launcher using a widget, but you can't use the same approach to add Assist app onto lock screen on Samsung phones.

There are 2 different shortcuts, one using the actual app feature in Companion app settings (Dynamic and Pinned) and the other is adding Assist from the Widget launcher. Which of these methods have you tried already?

So requesting to have a normal Assist app (not only Assist shortcut widget) for lock screen to make it possible to launch Assist also from Samsung's lock screen.

This request is to specifically add a dynamic shortcut for Assist and not a new launcher icon like we have on Wear OS. I think for that we probably want a separate request, if that is actually what is required here. Something tells me the dynamic shortcut should still work here.

jlatvala commented 10 months ago

There are 2 different shortcuts, one using the actual app feature in Companion app settings (Dynamic and Pinned) and the other is adding Assist from the Widget launcher. Which of these methods have you tried already?

I have now tried all three approaches (dynamic shortcut, pinned shortcut and adding Assist from widget launcher). It is not possible to add any of these three approaches into Samsung Galaxy S22's lockscreen as a shortcut (meaning, Assist can't be run from Samsung's lock screen).

Should I create a new separate feature request for this?

dshokouhi commented 10 months ago

Should I create a new separate feature request for this?

yes lets get a new request added as adding a new launcher icon is different than the shortcut feature

The issue is that it's hard to add a new shortcut type here without breaking existing use cases 🤔

@jpelgrom given that the user can use existing app features maybe it makes sense to drop a note in the docs instead of trying to add a new shortcut type that is already possible?

jpelgrom commented 10 months ago

@jpelgrom given that the user can use existing app features maybe it makes sense to drop a note in the docs instead of trying to add a new shortcut type that is already possible?

It's not really the same. Adding ?conversation=1 will open dashboard + Assist, whereas the 'normal' shortcut/widget opens only Assist. Still, I agree it might be worth a mention in the docs to clear up confusion (so many shortcut types).

dshokouhi commented 10 months ago

(so many shortcut types).

yea this would be a 3rd option right? Dashboard, Entity, Assist we also got a request for Notification History too.

jlatvala commented 10 months ago

yes lets get a new request added as adding a new launcher icon is different than the shortcut feature

https://github.com/home-assistant/android/issues/4046