Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add json outpuy #24

Closed
wants to merge 3 commits into from
Closed

add json outpuy #24

wants to merge 3 commits into from

Conversation

sante85
Copy link
Contributor

@sante85 sante85 commented Dec 21, 2023

No description provided.

@sante85 sante85 mentioned this pull request Dec 21, 2023
@sante85
Copy link
Contributor Author

sante85 commented Dec 21, 2023

@rosswarren can evaluate?

output["battery_discharge"] = controller.get_battery_discharge()
output["battery_charge"] = controller.get_battery_charge()
output["charging_mode"] = controller.get_charging_mode()
print(output)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the builtin json.dumps(output) here.
Using a library we make sure that the json will always be well-formatted and can be read across platforms.
The Python str() output of a dict should not be considered stable.

@sante85
Copy link
Contributor Author

sante85 commented Dec 23, 2023

pr updated

@SmithChart
Copy link
Contributor

@sante85 Thx! LGTM

@sante85
Copy link
Contributor Author

sante85 commented Dec 24, 2023 via email

@sante85
Copy link
Contributor Author

sante85 commented Dec 28, 2023 via email

@sante85
Copy link
Contributor Author

sante85 commented Jan 2, 2024

@SmithChart @rosswarren @hrford you are here to merge PR? thanks

@SmithChart
Copy link
Contributor

@sante85 Sorry, I am just a contributor and can not merge.

@sante85
Copy link
Contributor Author

sante85 commented Jan 5, 2024 via email

@sante85
Copy link
Contributor Author

sante85 commented Jan 11, 2024

i have update, @rosswarren @rafael2k @hrford please merge

@rosswarren
Copy link
Owner

thank you, these changes have been incorporated into #26 so closing this PR

@rosswarren rosswarren closed this Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants