From 2f13d6f6a513f20b7e88747a9f802af52d565b9d Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 19 Jan 2020 17:46:55 +0100 Subject: [PATCH] example: print power factor --- example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.py b/example.py index c7a2a5a..5758b0c 100644 --- a/example.py +++ b/example.py @@ -28,7 +28,7 @@ while True: socket.getStatus() socket.setStatus(True) print("=== {} ({}) ===".format(socket.mac_address, "on" if socket.powered else "off")) - print("\t{}V {}A → {}W@{}Hz".format(socket.voltage, socket.current, socket.power, socket.frequency)) + print("\t{}V {}A → {}W@{}Hz (PF: {})".format(socket.voltage, socket.current, socket.power, socket.frequency, socket.power_factor)) except (SEMSocket.NotConnectedException, bluepy.btle.BTLEDisconnectError): print("Restarting...") if socket != None: