Replies: 2 comments
-
Personally I don't have anything against that, so if you want to implement this, the file for the cli tool is located here https://github.com/python-kasa/python-kasa/blob/master/kasa/cli.py . The way to proceed would be adding a new flag for this option, and modify the context object to have a container (for device & options) that would be read by individual commands to see how they should format their output. |
Beta Was this translation helpful? Give feedback.
0 replies
-
JSON output support was added in #430. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be possible to have a --json option to output all data in json format?
Example:
'kasa --host hostipaddress --plug emeter --json'
{'current_ma': 1125, 'voltage_mv': 238381, 'power_mw': 158497, 'total_wh': 2510, 'err_code': 0}
Beta Was this translation helpful? Give feedback.
All reactions