From d221c83985135f88c2ab13f3cba1c9020db54edb Mon Sep 17 00:00:00 2001 From: Lutz Bender Date: Thu, 19 Mar 2026 08:02:53 +0100 Subject: [PATCH 1/3] update legacy SmartHome import --- packages/modules/web_themes/standard_legacy/web/smartHome.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/web_themes/standard_legacy/web/smartHome.html b/packages/modules/web_themes/standard_legacy/web/smartHome.html index a465ca420c..764b9d1383 100644 --- a/packages/modules/web_themes/standard_legacy/web/smartHome.html +++ b/packages/modules/web_themes/standard_legacy/web/smartHome.html @@ -450,7 +450,7 @@ // load scripts synchronously in order specified var scriptsToLoad = [ // load mqtt library - 'js/mqttws31.js', + 'js/mqtt-5.14.1.js', // some helper functions 'helperFunctions.js?ver=20221117', // functions for processing messages From 00eee3af6abd56242d768ef2c29fdc882cbe817f Mon Sep 17 00:00:00 2001 From: Lutz Bender Date: Thu, 19 Mar 2026 10:17:06 +0100 Subject: [PATCH 2/3] support "no_json" in Pub().pub() for legacy SmartHome --- packages/helpermodules/pub.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/helpermodules/pub.py b/packages/helpermodules/pub.py index aca8403bdd..8fb88a6983 100644 --- a/packages/helpermodules/pub.py +++ b/packages/helpermodules/pub.py @@ -13,8 +13,8 @@ def __init__(self) -> None: self.publisher = InternalBrokerPublisher() self.publisher.start_loop() - def pub(self, topic: str, payload, qos: int = 0, retain: bool = True) -> None: - if payload == "": + def pub(self, topic: str, payload, qos: int = 0, no_json: bool = False, retain: bool = True) -> None: + if payload == "" or no_json: self.publisher.client.publish(topic, payload, qos=qos, retain=retain) else: self.publisher.client.publish(topic, payload=json.dumps(payload), qos=qos, retain=retain) @@ -31,7 +31,8 @@ def __getattr__(self, name): return getattr(self.instance, name) -def pub_single(topic, payload, hostname="localhost", port=1883, no_json=False, retain=True): +def pub_single(topic: str, payload, hostname: str = "localhost", port: int = 1883, + no_json: bool = False, retain: bool = True): """ Sendet eine einzelne Nachricht an einen Host. Parameter @@ -46,10 +47,7 @@ def pub_single(topic, payload, hostname="localhost", port=1883, no_json=False, r Kompatibilität mit ISSS, die ramdisk verwenden. """ if hostname == "localhost": - Pub().pub(topic, payload, qos=0, retain=retain) + Pub().pub(topic, payload, qos=0, no_json=no_json, retain=retain) return - if no_json: - publish.single(topic, payload, hostname=hostname, port=port, retain=retain) - else: - publish.single(topic, json.dumps(payload), hostname=hostname, port=port, retain=retain) + publish.single(topic, payload if no_json else json.dumps(payload), hostname=hostname, port=port, retain=retain) From fa89299c9d6031efd434d8c601ffd811bd639e64 Mon Sep 17 00:00:00 2001 From: benderl Date: Thu, 19 Mar 2026 10:26:07 +0100 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- packages/helpermodules/pub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpermodules/pub.py b/packages/helpermodules/pub.py index 8fb88a6983..1286da7ad9 100644 --- a/packages/helpermodules/pub.py +++ b/packages/helpermodules/pub.py @@ -13,7 +13,7 @@ def __init__(self) -> None: self.publisher = InternalBrokerPublisher() self.publisher.start_loop() - def pub(self, topic: str, payload, qos: int = 0, no_json: bool = False, retain: bool = True) -> None: + def pub(self, topic: str, payload, qos: int = 0, retain: bool = True, no_json: bool = False) -> None: if payload == "" or no_json: self.publisher.client.publish(topic, payload, qos=qos, retain=retain) else: