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)