Webview Auto Login

Is it possible to have the App auto login when using webview to launch a lovelace view?

automation:

  • alias: Open android webview
    trigger:

    action:
    • service: notify.mobile_app_<your_device_id_here>
      data:
      message: “command_webview”
      title: “/lovelace/settings”

What do you mean auto login? You should already be logged in.

Once the app launches if the phone screen is on (awake), it requires app authentication (pin/password), if the phone screen is off, nothing happens until you interact with the phone.

so you want to bypass the lock mechanism that you enabled when the webview is open?

Yes if possible, wake the phone (turn screen on), launch app and display the view based on the automation action/title.

Ok feel free to submit a feature request on GitHub

1 Like

Summited, is the decryption good enough?

i responded with the specifics of the request :slight_smile:

1 Like

:+1: Thank you.

So I would specify two actions?
Is message required or platform/integration specific?

automation:
  - alias: Open android webview
    trigger:
      ...
    action:
      - service: notify.mobile_app_<your_device_id_here>
        data:
          title: "Wake up!"
      - service: notify.mobile_app_<your_device_id_here>
        data:
          message: "command_webview"
          title: "/lovelace/settings"

correct

always, for any notify platform

also first service call is incorrect, follow this example: Notification Commands | Home Assistant Companion Docs but keep in mind you do not need to use title if you do not wish for the screen to remain on.

Thanks, took that from Critical notifications | Home Assistant Companion Docs, just getting into fully utilizing the abilities of the app.

So “command_screen_on” works, but an oversite to the initial quarry, the phone lock screen :man_facepalming:.

the actual phone lock screen we wont bypass…I thought you had enabled the lock app setting in the companion app configuration

Yes, both.

I don’t mind disabling the app lock, which will all assist in the auto launch and view, but I would not like to leave the phone unlocked (no pin/password)

I agree, the reason why the app will not remove the lock screen is because it requires the app to become a device administrator. Then imagine you are relying on the app to relock the devcie but the app crashed leaving your device unlocked. For reasons like that we felt it was not a good permission for us to go after.

I concur. I guess it’s back to the drawing board :disappointed:.