From 3b451aa5e61257269ad4aa0b2ae92e41a1501de4 Mon Sep 17 00:00:00 2001 From: gamuama <95503016+gamuama@users.noreply.github.com> Date: Tue, 18 Jan 2022 21:17:38 +0100 Subject: [PATCH] Update plugjson.py added error variable to json output --- plugjson.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugjson.py b/plugjson.py index 9d3c1f5..c4c55a9 100755 --- a/plugjson.py +++ b/plugjson.py @@ -41,7 +41,7 @@ # Print output json responsejson = ( - '{ "datetime": "%s", "switch": "%s", "power": "%s", "current": "%s", "voltage": "%s" }' - % (iso_time, on, w, mA, V) + '{ "datetime": "%s", "switch": "%s", "power": "%s", "current": "%s", "voltage": "%s", "error": "%s" }' + % (iso_time, on, w, mA, V, err) ) print(responsejson)