Open voed opened 1 year ago
please do not combine multiple requests into one, one should be created for each request.
Sorry. Fixed.
For this we should make it an option in settings, we also need to do a permission check on certain android versions to autostart.
In the meantime you are more than welcome to use existing app features to automate this already.
BOOT_COMPLETED
command_webview
notification command to open the app, make sure to test the command first so you can give the app proper permissionMaybe even start as a launcher to reduce RAM usage?
I think making the app into a launcher is a bit out scope for the project and this request :)
Interesting solution. Had no idea we can do this:) But for me BOOT_COMPLETED sometimes triggered before WIFI being connected, so i just used "from ACTION_SHUTDOWN" trigger:
alias: Tablet HA start
description: ""
trigger:
- platform: state
entity_id:
- sensor.lenovo_yt3_x50fn_last_update_trigger
from: android.intent.action.ACTION_SHUTDOWN
condition: []
action:
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: notify.mobile_app_lenovo_yt3_x50fn
data:
message: command_webview
mode: single
Thanks.
Hello, I'm not sure to understand how these sensors can work if the Companion not launched on the Android phone ? Should be great to have an option in the Companion settings.
Regards
Hello, I'm not sure to understand how these sensors can work if the Companion not launched on the Android phone ? Should be great to have an option in the Companion settings.
Sensors are scheduled to update periodically if you started the app once. The system will take care of restarting these updates when the device is rebooted / updated, so this already works. The feature request is for opening the app (showing a dashboard) immediately after starting the device.
My version of working automation:
alias: Tablet - Home Assistant autostart
description: ""
triggers:
- trigger: state
entity_id:
- sensor.sm_t815_last_reboot
conditions: []
actions:
- action: notify.mobile_app_sm_t815
metadata: {}
data:
message: command_webview
mode: single
For start by command you need persistent connection in app (App - Settings - Server / Connection - Persistent Connection) and app permission (just send "command_webview" command when app is running). Also "Last reboot" sensor needs to be activated in app.
Not so user-friendly. Some option in app would be great.
I am using my old tablet as a control panel for Home Assistant and it scheduled to reboot every night for proper work. It would be great to have autostart feature out of the box, without installing 3rd party apps. Maybe even start as a launcher to reduce RAM usage?