diff --git a/HCDevice.py b/HCDevice.py index 54fa5c1..b72ff21 100755 --- a/HCDevice.py +++ b/HCDevice.py @@ -122,7 +122,7 @@ class HCDevice: for option in data["options"]: option_uid = option["uid"] if str(option_uid) not in self.features: - raise ValueError( + raise ValueError( f"Unable to configure appliance. Option UID {option_uid} is not" " valid for this device." ) diff --git a/hc2mqtt b/hc2mqtt index fb574ad..06607dd 100755 --- a/hc2mqtt +++ b/hc2mqtt @@ -145,7 +145,7 @@ dev = {} def client_connect(client, device, mqtt_topic): host = device["host"] - device_topics = topics + device_topics = topics.copy() for value in device["features"]: if ( @@ -213,6 +213,5 @@ def client_connect(client, device, mqtt_topic): time.sleep(40) - if __name__ == "__main__": hc2mqtt()