garage.py - Markierung der Zeilen die im Winter deaktiviert werden

This commit is contained in:
2023-05-07 07:45:27 +00:00
parent 72ecb10034
commit 904e155a96
+2 -2
View File
@@ -15,7 +15,7 @@ cherrypy.config.update({
logger = logging.getLogger('Rotating Log')
logger.setLevel(logging.INFO)
logHandler = handlers.RotatingFileHandler('/home/pi/garage.log', maxBytes=1000000, backupCount=2)
logHandler = handlers.RotatingFileHandler('/home/pi/garagelog.log', maxBytes=1000000, backupCount=2)
logHandler.setLevel(logging.INFO)
logHandler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s - %(message)s', '%Y-%m-%d %H:%M:%S'))
logger.addHandler(logHandler)
@@ -114,6 +114,7 @@ def gate_button(channel):
GPIO.output(PIN_GATE, GPIO.LOW)
GPIO.output(PIN_LED, GPIO.LOW)
# DEAKTIVIEREN FÜR WINTERPAUSE:
if toSafety == True:
mower_safety()
else:
@@ -186,7 +187,6 @@ class GarageService(object):
cherrypy.quickstart(GarageService())
logger.info('Shutdown')
logger.info('Reset GPIO configuration and close')