Difference between revisions of "Disable charging LED with tasker on Galaxy S7"

From HeepyWiki
Jump to navigation Jump to search
(Created page with "== Accessing Settings == Settings for individually enabling/disabling the charging LED indicator aren't exposed in the settings UI, instead they're grouped together with low b...")
 
 
Line 32: Line 32:
 
</pre>
 
</pre>
  
Then add another ''Code''/''Run Shell'' task for:
+
Then add another ''Code'' / ''Run Shell'' task for:
 
<pre>
 
<pre>
 
/sbin/su -c settings put system led_indicator_low_battery 0
 
/sbin/su -c settings put system led_indicator_low_battery 0

Latest revision as of 23:20, 21 April 2017

Accessing Settings

Settings for individually enabling/disabling the charging LED indicator aren't exposed in the settings UI, instead they're grouped together with low battery, missed event, and voice recording.

The settings are visible to the android "settings" shell command, but helpfully Samsung has misspelled "charging" as "charing" (!)

Changing values via commandline

So for instance to turn off battery lights at night, set up a schedule in tasker to turn LED indications off at bedtime:

settings put system led_indicator_low_battery 0
settings put system led_indicator_charing 0

And then turn them back on in the morning:

settings put system led_indicator_low_battery 1
settings put system led_indicator_charing 1

Tasker Setup

In tasker, create a "bedtime" profile of type "Time" and set the hours to whenever you want bedtime to be.

Let it create a new task, call it "kill charging light".

For the task, add a "Code" action of type "Run Shell" and for the command, enter:

/sbin/su -c settings put system led_indicator_charing 0

Then add another Code / Run Shell task for:

/sbin/su -c settings put system led_indicator_low_battery 0

(or leave out the su and check "Use Root" if root mode in Tasker works; it doesn't with my current rom using Magisk su)

Next, add the return task, "enable charging light" which is the same thing (use the clone task option) except with "1" instead of "0"

Then go back to the Bedtime profile, long-press the "-> Kill Charging Light", and select "Add return task", and set it to the just-created "Enable charging light" task.

Now every night at 11, the charging and low-battery LED indicators will be disabled so it can be dark, and at 8am they'll be enabled again so you can have a visual indicator of charging and low-bat.