[Google Pixel XL Guides, News, & Discussion] JLIspace:
Oneplus 3 Charge Limit Tasker Task

I had the same problem with my rooted Oneplus 3. When you modify charging_enabled to "1" it changes it back in no time. Therefore I made my own task which changes the file to read-only after I modified it. This way I got charge-limit working. Maybe this will also do the trick when it comes to current limiting. :^)

I'll add my tasks. Maybe they will help some OnePlus 3 users figure it out :)

(as text because I can't find a attach file button? :0)

regards

<TaskerData sr="" dvi="1" tv="5.2.bf1">
<Task sr="task3">
<cdate>1503890534633</cdate>
<edate>1534648217857</edate>
<id>3</id>
<nme>Charge Limit</nme>
<pri>100</pri>
<rty>2</rty>
<Kid sr="Kid">
<eperm0>root</eperm0>
<launchID>3</launchID>
<pkg>chargelimit.jli.space</pkg>
<vnme>1.0</vnme>
</Kid>
<Action sr="act0" ve="7">
<code>547</code>
<label>ChargeLevelHigh</label>
<Str sr="arg0" ve="3">%ChargeLevelHigh</Str>
<Str sr="arg1" ve="3">80</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<label>ChargeLevelLow</label>
<Str sr="arg0" ve="3">%ChargeLevelLow</Str>
<Str sr="arg1" ve="3">75</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act10" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%NotificationMessage</Str>
<Str sr="arg1" ve="3">Discharging until %ChargeLevelLow%</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ChargeMode</lhs>
<op>0</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act11" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotificationMessage</Str>
<Str sr="arg1" ve="3">ChargeMode: %ChargeMode # ChargeStatus: %ChargeStatus</Str>
<Img sr="arg2" ve="2">
<nme>mw_device_battery_alert</nme>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act12" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="30"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act13" ve="7">
<code>135</code>
<label>loop</label>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>137</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ChargeLevelHigh</lhs>
<op>6</op>
<rhs>%ChargeLevelLow</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>547</code>
<label>Charge at startup</label>
<Str sr="arg0" ve="3">%ChargeMode</Str>
<Str sr="arg1" ve="3">1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>1</lhs>
<op>0</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<label>Get Charging Source</label>
<Str sr="arg0" ve="3">su
chmod 666 /sys/class/power_supply/battery/status
cat /sys/class/power_supply/battery/status</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3">%ChargeStatus</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>547</code>
<label>setChargeMode (start charging -> 1)</label>
<Str sr="arg0" ve="3">%ChargeMode</Str>
<Str sr="arg1" ve="3">1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%ChargeStatus</lhs>
<op>0</op>
<rhs>Discharging</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%BATT</lhs>
<op>6</op>
<rhs>%ChargeLevelLow+1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act6" ve="7">
<code>547</code>
<label>setChargeMode (start discharge -> 0)</label>
<Str sr="arg0" ve="3">%ChargeMode</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%ChargeStatus</lhs>
<op>0</op>
<rhs>Charging</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%BATT</lhs>
<op>7</op>
<rhs>%ChargeLevelHigh-1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act7" ve="7">
<code>123</code>
<label>Start Charging</label>
<se>false</se>
<Str sr="arg0" ve="3">su
chmod 666 /sys/class/power_supply/battery/charging_enabled
echo "1" > /sys/class/power_supply/battery/charging_enabled
su
chmod 444 /sys/class/power_supply/battery/charging_enabled</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ChargeMode</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act8" ve="7">
<code>123</code>
<label>Stop Charging</label>
<se>false</se>
<Str sr="arg0" ve="3">su
chmod 666 /sys/class/power_supply/battery/charging_enabled
echo "0" > /sys/class/power_supply/battery/charging_enabled
su
chmod 444 /sys/class/power_supply/battery/charging_enabled</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ChargeMode</lhs>
<op>0</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act9" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%NotificationMessage</Str>
<Str sr="arg1" ve="3">Charging until %ChargeLevelHigh%</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ChargeMode</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Img sr="icn" ve="2">
<uri>content://com.android.providers.media.documents/document/image%3A1187</uri>
</Img>
</Task>
</TaskerData>

<TaskerData sr="" dvi="1" tv="5.2.bf1">
<Task sr="task2">
<cdate>1534648113341</cdate>
<edate>1534648209202</edate>
<id>2</id>
<nme>Disable Charge Limit</nme>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">su
chmod 666 /sys/class/power_supply/battery/charging_enabled
echo "1" > /sys/class/power_supply/battery/charging_enabled</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Img sr="icn" ve="2">
<uri>content://com.android.providers.media.documents/document/image%3A1187</uri>
</Img>
</Task>
</TaskerData>