From ae0d8d1105754f7081dbab5b6d54040b4e0aad36 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 20:41:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- hc2mqtt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hc2mqtt.py b/hc2mqtt.py index 5cce59d..53d7c97 100755 --- a/hc2mqtt.py +++ b/hc2mqtt.py @@ -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}")