Skip to content

Commit

Permalink
Update plugjson.py
Browse files Browse the repository at this point in the history
added error variable to json output
  • Loading branch information
gamuama authored Jan 18, 2022
1 parent 61f65b5 commit 3b451aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3b451aa

Please sign in to comment.