Merge branch 'main' into mqtt_lwt
This commit is contained in:
@@ -122,7 +122,7 @@ class HCDevice:
|
|||||||
for option in data["options"]:
|
for option in data["options"]:
|
||||||
option_uid = option["uid"]
|
option_uid = option["uid"]
|
||||||
if str(option_uid) not in self.features:
|
if str(option_uid) not in self.features:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Unable to configure appliance. Option UID {option_uid} is not"
|
f"Unable to configure appliance. Option UID {option_uid} is not"
|
||||||
" valid for this device."
|
" valid for this device."
|
||||||
)
|
)
|
||||||
|
|||||||
3
hc2mqtt
3
hc2mqtt
@@ -145,7 +145,7 @@ dev = {}
|
|||||||
|
|
||||||
def client_connect(client, device, mqtt_topic):
|
def client_connect(client, device, mqtt_topic):
|
||||||
host = device["host"]
|
host = device["host"]
|
||||||
device_topics = topics
|
device_topics = topics.copy()
|
||||||
|
|
||||||
for value in device["features"]:
|
for value in device["features"]:
|
||||||
if (
|
if (
|
||||||
@@ -213,6 +213,5 @@ def client_connect(client, device, mqtt_topic):
|
|||||||
|
|
||||||
time.sleep(40)
|
time.sleep(40)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
hc2mqtt()
|
hc2mqtt()
|
||||||
|
|||||||
Reference in New Issue
Block a user