Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Klaehn
2c9ca24164 config: Move config file 2021-04-06 08:26:20 +02:00

View File

@ -1,3 +1,4 @@
import os
import json
import datetime
import logging
@ -18,7 +19,7 @@ heat_pin = 26
heat_state = False
CONFIG_FILE = "config/greenhouse.json"
CONFIG_FILE = "greenhouse/config/greenhouse.json"
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
@ -94,6 +95,7 @@ class GreenControl(Thread):
while self.__run_condition:
if self.__trigger_read_config:
self.__trigger_read_config = False
log.info(os.getcwd())
with open(self.cfg_file, "r") as f:
self.config = json.load(f)
now = datetime.datetime.now()