fixed shell file path
This commit is contained in:
3
lightSwitch.py
Normal file → Executable file
3
lightSwitch.py
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
import time
|
||||
import RPi.GPIO as GPIO
|
||||
@@ -23,7 +24,7 @@ try:
|
||||
while True:
|
||||
if touchDet(touchPin):
|
||||
print('['+time.ctime()+'] - '+'Touch Detected, Light Switch Toggled')
|
||||
subprocess.run('./lightSwitch.sh')
|
||||
subprocess.run('./home/pi/homeassistantPi/lightSwitch.sh')
|
||||
time.sleep(0.2)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user