[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2024-07-20 20:41:57 +00:00
parent 9afcc3da8e
commit ae0d8d1105

View File

@@ -67,8 +67,12 @@ def hc2mqtt(
# If the device has the SelectedProgram feature it allows programs to be selected
# via /ro/selectedProgram
if "BSH.Common.Root.SelectedProgram" == device["features"][value]["name"]:
mqtt_selected_program_topic = f"{mqtt_prefix}{device['name']}/selectedProgram"
print(now(), device["name"], f"program topic: {mqtt_selected_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)
else:
print(now(), f"ERROR MQTT connection failed: {rc}")