aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2026-11-08 10:38:58 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2026-11-08 10:38:58 +0000
commit1703b537ef4286629b0707aec27681f844e4d9a0 (patch)
tree2437c876f77df741a24f05fee81da47d8a55b4b4
parentbe3acc9349d8c74e56277f1addd453d33d153431 (diff)
downloadpower.eda.gay-master.tar.gz
power.eda.gay-master.zip
Added sleep to thread so __file__ doesn't expireHEADmaster
-rw-r--r--mqtt-client/mqtt-client.py4
1 files changed, 3 insertions, 1 deletions
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():