[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -67,8 +67,12 @@ def hc2mqtt(
|
|||||||
# If the device has the SelectedProgram feature it allows programs to be selected
|
# If the device has the SelectedProgram feature it allows programs to be selected
|
||||||
# via /ro/selectedProgram
|
# via /ro/selectedProgram
|
||||||
if "BSH.Common.Root.SelectedProgram" == device["features"][value]["name"]:
|
if "BSH.Common.Root.SelectedProgram" == device["features"][value]["name"]:
|
||||||
mqtt_selected_program_topic = f"{mqtt_prefix}{device['name']}/selectedProgram"
|
mqtt_selected_program_topic = (
|
||||||
print(now(), device["name"], f"program topic: {mqtt_selected_program_topic}")
|
f"{mqtt_prefix}{device['name']}/selectedProgram"
|
||||||
|
)
|
||||||
|
print(
|
||||||
|
now(), device["name"], f"program topic: {mqtt_selected_program_topic}"
|
||||||
|
)
|
||||||
client.subscribe(mqtt_selected_program_topic)
|
client.subscribe(mqtt_selected_program_topic)
|
||||||
else:
|
else:
|
||||||
print(now(), f"ERROR MQTT connection failed: {rc}")
|
print(now(), f"ERROR MQTT connection failed: {rc}")
|
||||||
|
|||||||
Reference in New Issue
Block a user