HA is one of those few self hostable apps that is always synced across all devices.
Is it possible to make it run some custom code/routines on a specific device?
My use case is to toggle whether my android phone charges its battery to 70% or 100%. The ACCA app takes care of this, I just need HA to run some custom bash commands.
I do this to maximize life span its lithium battery.
if you can hook it into tasker or using the android intent system this might be achievable…youll need to do some research to see what is possible with that app.
EDIT: btw i used this method for bluetooth because the HA app cannot control BT on android 13 and avove but Macrodroid can. Agree with others you can also use intents for your use case.
This command format does not match what you linked me to. The intent extra is not setup properly either its missing the variable name, all you have as of now is variable value. The only thing correct above is the package name and intent action.
reading further into the page, looks like termux has their own custom permission they are expecting the app to request. Unfortunately this requires the app to hardcode an app specific permission and not a general android permission so the app will not have support for the custom permission.
Judging by teh above link you’ll probably need to link tasker to termux for this.
But I thought it might be useful for the companion app to add a custom sensor/switch, i.e. we can configure it to call (root) commands to retrieve values that are send back to HA as a sensor, and have a switch that runs a ON and OFF command.