From a71c58208f292d8132cf3ceb75f54f0c8f855447 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:51:02 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- hc2mqtt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hc2mqtt b/hc2mqtt index a487b75..9753ea3 100755 --- a/hc2mqtt +++ b/hc2mqtt @@ -93,7 +93,6 @@ def hc2mqtt( except Exception as e: print(now(), device_name, "ERROR", e, file=sys.stderr) - click.echo( f"Hello {devices_file=} {mqtt_host=} {mqtt_prefix=} " f"{mqtt_port=} {mqtt_username=} {mqtt_password=} " @@ -202,7 +201,11 @@ def client_connect(client, device, mqtt_topic): print(now(), device["name"], f"publish to {mqtt_topic} with {msg}") client.publish(f"{mqtt_topic}/state", msg) else: - print(now(), device["name"], "ERROR Unable to publish update as mqtt is not connected.") + print( + now(), + device["name"], + "ERROR Unable to publish update as mqtt is not connected.", + ) except Exception as e: print(device["name"], "ERROR", e, file=sys.stderr)