Skip to content

Conversation

@loveyou001
Copy link

When the optional device_type argument is omitted from the 'show ps data' and 'show ps graph' commands, the arguments are misinterpreted, leading to incorrect API calls.

This commit fixes the issue by explicitly checking for the presence of the device_type argument and returning an error if it is missing when a date range is provided. This ensures that the command fails gracefully with a clear error message instead of making an invalid API call.

When the optional device_type argument is omitted from the 'show ps data' and 'show ps graph' commands, the arguments are misinterpreted, leading to incorrect API calls.

This commit fixes the issue by explicitly checking for the presence of the device_type argument and returning an error if it is missing when a date range is provided. This ensures that the command fails gracefully with a clear error message instead of making an invalid API call.
@Paraphraser
Copy link

I have included this PR in the list of patches in Part 1 of the "Updating GoSungrow" gist.

I have added Part 5 to the gist to explain how to take the recompiled binary and use it to construct an updated Docker image for use as the Home Assistant GoSungrow add-on.

I hope this helps anyone who is can't run GoSungrow at the moment because of the problem which is fixed by this PR.

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.

2 participants