add termux configuration from phone
This commit is contained in:
parent
52c490dcea
commit
cd550ba6e6
5 changed files with 158 additions and 4 deletions
13
.config/termux/tasker/toggle-lights.sh
Executable file
13
.config/termux/tasker/toggle-lights.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
PLG="$HOME/bin/tplink_smartplug.py -t 192.168.1.250 -c"
|
||||
|
||||
# If the light is on
|
||||
if $PLG info | grep ',"relay_state":1,';then
|
||||
$PLG off &&
|
||||
exit 0
|
||||
else
|
||||
$PLG on &&
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue