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

datatime attribute added #58

Merged
merged 7 commits into from
Oct 7, 2023
Merged

datatime attribute added #58

merged 7 commits into from
Oct 7, 2023

Conversation

LutzHelling
Copy link
Contributor

Hi, I've added the datatime attribute when getting the energy consumption data. This helps plotting a consumption graph with time ticks on the x-axis. I would appreciate if you could integrate this extension in your beautiful project. Thanks in advance!

Copy link
Owner

@kaklakariada kaklakariada left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your pull request!
I have only some minor findings.
Please also add a unit test to verify that reading the timestamp works.
If you want you could also change getDataTime() to return an Instant instead of long. This makes it easier to understand the meaning.

CHANGELOG.md Outdated

## [1.6.1] - unreleased

- datatime attribute added in devicestats XML response since Fritz OS 7.50
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
- datatime attribute added in devicestats XML response since Fritz OS 7.50
- [#58](https://github.com/kaklakariada/fritzbox-java-api/pull/58) datatime attribute added in devicestats XML response since Fritz OS 7.50

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've converted the return value into an Instant as you suggested and added a few small tests into your existing test classes.
Furthermore I've merged with your newest commit on master, hope you are fine with it.

In case I should add anything, let me know.

Copy link
Owner

Choose a reason for hiding this comment

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

Please avoid such a big diff and keep using * instead of - for lists

@kaklakariada
Copy link
Owner

Hi @LutzHelling, I am not sure if the commit worked. I only see two additional merge commits in this PR, but there are no changes to the code.

@LutzHelling
Copy link
Contributor Author

LutzHelling commented Oct 7, 2023 via email

@kaklakariada
Copy link
Owner

Hi @LutzHelling,
the build is failing and I would like to improve the tests and handling of default values.
To speedup the process I will directly edit your PR and ask you for your approval.

@kaklakariada
Copy link
Owner

@LutzHelling Please check my changes if this was your intention.

@kaklakariada kaklakariada merged commit 59b11ce into kaklakariada:master Oct 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants