From 1703b537ef4286629b0707aec27681f844e4d9a0 Mon Sep 17 00:00:00 2001 From: jwansek Date: Sun, 8 Nov 2026 10:38:58 +0000 Subject: Added sleep to thread so __file__ doesn't expire --- mqtt-client/mqtt-client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mqtt-client/mqtt-client.py b/mqtt-client/mqtt-client.py index a738a16..28c070a 100644 --- a/mqtt-client/mqtt-client.py +++ b/mqtt-client/mqtt-client.py @@ -156,7 +156,9 @@ class MQTTClient: print("TV Zigbee button pressed, toggling TasmotaTV Tasmota Plug") status_before = self.get_http_power_status("192.168.5.6", os.environ["MQTT_PASSWD"]) self.toggle_plug("TasmotaTV") - threading.Thread(target = toggle_firestick, args = (status_before, )).start() + t = threading.Thread(target = toggle_firestick, args = (status_before, )) + t.start() + time.sleep(1) # toggle_firestick(status_before) if zigbee_id == "0x74B3" and friendlyname == "HarveyButton" and "Power" in fields.keys(): -- cgit v1.2.3