From b8656917f5d7c8a5cf9cb2be7d60ce2e0607750a Mon Sep 17 00:00:00 2001 From: jerick Date: Sat, 22 Oct 2022 21:05:18 -0400 Subject: [PATCH] fixed shell file path --- README.md | 2 ++ lightSwitch.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 lightSwitch.py diff --git a/README.md b/README.md index e69de29..8f8eec0 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,2 @@ +Service File can be found at /lib/systemd/system on Pi + diff --git a/lightSwitch.py b/lightSwitch.py old mode 100644 new mode 100755 index 1b777e8..be74c9c --- a/lightSwitch.py +++ b/lightSwitch.py @@ -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: