From b67c8fb06a2f0a1fcd561870e175a5303db677d9 Mon Sep 17 00:00:00 2001 From: Daniel Gretzke Date: Mon, 9 Dec 2019 18:58:29 +0100 Subject: [PATCH] fix disconnectButton not visible sometimes --- plug_py/plug.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug_py/plug.py b/plug_py/plug.py index 644d9dc..25e730d 100644 --- a/plug_py/plug.py +++ b/plug_py/plug.py @@ -567,6 +567,8 @@ async def initialized_S(self): self.paymentState = State.active_P async def active_P(self): + window.ui.acceptPriceButton.setVisible(False) + window.ui.disconnectButton.setVisible(True) # send first transaction regardless whether current is flowing or not if self.transactionCounter != 0: # after first transaction was sent wait until current flows, start timer @@ -575,7 +577,6 @@ async def active_P(self): window.cm_thread = measureCurrent() window.cm_thread.start() self.startTimestamp = time() - window.ui.disconnectButton.setVisible(True) return else: # if current measurement thread not running, set up