From 1f5da172d6f8d4a147eef9a5787c151fa832f1e9 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" <git@edgarpierre.fr> Date: Sun, 9 Mar 2025 20:13:09 +0100 Subject: [PATCH] Fix command output handling to return an empty string on error --- hasspy/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hasspy/mqtt.py b/hasspy/mqtt.py index bb7b9ce..76932a1 100644 --- a/hasspy/mqtt.py +++ b/hasspy/mqtt.py @@ -351,6 +351,6 @@ class HassUserClient(HassClient): def run_command(cmd: list[str]) -> Tuple[int, str]: proc = run(cmd, capture_output=True) if proc.returncode != 0: - return proc.returncode, "null" + return proc.returncode, "" return proc.returncode, proc.stdout.decode("utf-8")