Slightly improved logging
This commit is contained in:
parent
431450010e
commit
c36c75ac48
@ -64,6 +64,7 @@ async def main():
|
||||
config = json.load(open(config_path))
|
||||
level = logging.INFO
|
||||
if "log_level" in config:
|
||||
logging.info(f"Setting log_level {config['log_level']}")
|
||||
if config["log_level"] == "DEBUG":
|
||||
level = logging.DEBUG
|
||||
logging.basicConfig(level=level, format="[%(asctime)s] [%(levelname)s] %(message)s")
|
||||
@ -85,7 +86,7 @@ async def main():
|
||||
sensor_mappings[mapping["sensor"]] = []
|
||||
sensor_mappings[mapping["sensor"]].append(mapping["thermostate"])
|
||||
thermostate_mappings[mapping["thermostate"]] = mapping["sensor"]
|
||||
|
||||
logging.debug(f"Mappings: {sensor_mappings} {thermostate_mappings}")
|
||||
try:
|
||||
await init(ha, fb)
|
||||
except KeyboardInterrupt:
|
||||
|
Loading…
x
Reference in New Issue
Block a user