Repository navigation
Add raw fetch methods; make CLI info resilient to unparseable responses - #100
Merged
Merged
Conversation
…onses get_status_full_raw/get_errors_raw/get_reminders_raw return API data without parsing, so diagnostics can see values the library does not yet recognize. The CLI info command now uses them and reports failures per section instead of aborting. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Spa.get_status_full_raw(),get_errors_raw()andget_reminders_raw(), which return API data without parsing. They don't raise on values the library doesn't recognize yet, so callers such as Home Assistant diagnostics can still see what the API sent.python -m smarttub infoto use the raw data and report failures per section. Previously an unparseablefullStatusaborted the whole command before anything was printed.asyncio.run(...)withif __name__ == "__main__":so it can be tested.The parsing behaviour of the existing typed methods is unchanged: unrecognized values still fail loudly.
Note that
infonow prints pumps, lights, locks and sensors as raw dicts rather than object reprs.locationis still omitted unless--locationis given.Test plan
pytest(new tests for the raw methods and the CLI, including a failing section not hiding the others)ruff check/ruff format🤖 Generated with Claude Code