From 7de3539f5ede999bcefdc9b49deb46b9d4f98dba Mon Sep 17 00:00:00 2001 From: Andy Loughran Date: Sun, 4 Feb 2024 20:22:32 +0000 Subject: [PATCH] Fixed with command --- heatmiserv3/heatmiser.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/heatmiserv3/heatmiser.py b/heatmiserv3/heatmiser.py index fad1ec5..4c7ef91 100644 --- a/heatmiserv3/heatmiser.py +++ b/heatmiserv3/heatmiser.py @@ -23,8 +23,7 @@ def __init__(self, address, model, uh1): self.address = address self.model = model try: - with open(config_yml) as config_file: - self.config = yaml.safe_load(config_file)[model] + self.config = yaml.safe_load(config_yml)[model] except yaml.YAMLError as exc: logging.info("The YAML file is invalid: %s", exc) self.conn = uh1.registerThermostat(self)