Very new to Home Assistant and trying to set up a routine where the battery level of my tablet triggers an action. For the moment, it does not seem to work … it only triggers on manually and does not follow the trigger off condition.
Please see the code below :.
The idea is that if the battery level falls below 30%, the charger plug activates and turns off when the tablet reaches 90%. As mentioned, newbie working with the UI hence sorry if this issue seems to basic to post.
Please post your code as preformatted text (</> in the cogwheel menu). This allows other people to copy it and try it out.
It’s not a good idea to have automations running for more than a minute or two, so I’d suggest either two automations, one for on and one for off, or two triggers with a choose action depending on which one fires.
Edit: If you can’t get the preformatted text button to work, you can put three backticks before and after the text to be formatted - usually on the key next to the 1. There’s a post about it here:
Thanks for the support !
I have corrected the post as per the rules and regulations.
As I posted this yesterday from a tablet, the “cog wheel” was not a function that was available to me.
I was a bit too early with my announcement that it works. It still does not !
It seems that my tablet is not “sending” the battery status for Home Assistant to pick up. When I manually start the routine, the routine stops at 90% but it does not seem to want to start when the battery goes below x %
Scratching my head but not really understanding why …