From 482e4a767cea6499b5ba26a56baa0db16e2830b7 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 9 Jun 2025 14:14:22 +0100 Subject: Reverted to toggling geoffery with MQTT instead of HTTP --- mqtt-client/mqtt-client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mqtt-client') diff --git a/mqtt-client/mqtt-client.py b/mqtt-client/mqtt-client.py index 00a808f..37ed8cb 100644 --- a/mqtt-client/mqtt-client.py +++ b/mqtt-client/mqtt-client.py @@ -106,11 +106,11 @@ class MQTTClient: if fields["Power"] == 2: print("TV Zigbee button pressed, toggling TasmotaTV Tasmota Plug") self.toggle_plug("TasmotaTV") - # threading.Thread(target = toggle_geoffery, args = ()).start() - loop = asyncio.get_event_loop() - loop.run_until_complete(tasmotaHTTPClient.main(host = "geoffery.plug", username = "admin", password = os.environ["MQTT_PASSWD"], toggle = True)) - time.sleep(8) - loop.run_until_complete(tasmotaHTTPClient.main(host = "geoffery.plug", username = "admin", password = os.environ["MQTT_PASSWD"], toggle = True)) + threading.Thread(target = toggle_geoffery, args = ()).start() + #loop = asyncio.get_event_loop() + #loop.run_until_complete(tasmotaHTTPClient.main(host = "geoffery.plug", username = "admin", password = os.environ["MQTT_PASSWD"], toggle = True)) + #time.sleep(8) + #loop.run_until_complete(tasmotaHTTPClient.main(host = "geoffery.plug", username = "admin", password = os.environ["MQTT_PASSWD"], toggle = True)) if zigbee_id == "0x74B3" and friendlyname == "HarveyButton" and "Power" in fields.keys(): -- cgit v1.2.3