fixed shell file path

This commit is contained in:
2022-10-22 21:05:18 -04:00
parent 88bfe9851d
commit b8656917f5
2 changed files with 4 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
Service File can be found at /lib/systemd/system on Pi

3
lightSwitch.py Normal file → Executable file
View 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: