-
Go to
app/build.gradle.kts
and edit the following strings:baseUrl
: your personal url prefix that already populates your QR codestag
: the suffix that is appended after BASE_URL and before the tag IDhaUrl
: the deeplink prefix used by Home Assistant Companion app on Android.
The templating makes this the only region in the app folder where you need to modify things.
-
Build and run in Android Studio
-
Once installed on your phone, you may need to go to the app settings and switch on the baseURL in the default definitions.
-
Important note: the only rule here is that the TAG_ID of a given QRCode should match the one in Home Assistant.
Don't leave the
TAG ID
field blank in the Home Assistant Companion app if you want this to work reliably! -
As of
2023-11-25
, you can now click on the logo (or the QuickSettings tile) to launch an integrated ZXing QR Code reader that will trigger the HA event.
I used ChatGPT4 to generate most of the code, as well as drafts of the logo.
This is my solution to avoid touching at the Home-Assistant code while answering the needs described on the Home-Assistant forum