Skip to content

Add raw fetch methods; make CLI info resilient to unparseable responses - #100

Merged
mdz merged 1 commit into
mainfrom
raw-diagnostics
Oct 25, 2026
Merged

mdz merged 1 commit into
mainfrom
raw-diagnostics

Conversation

@mdz

@mdz mdz commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Spa.get_status_full_raw(), get_errors_raw() and get_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.
  • Rewrite python -m smarttub info to use the raw data and report failures per section. Previously an unparseable fullStatus aborted the whole command before anything was printed.
  • Guard the CLI's asyncio.run(...) with if __name__ == "__main__": so it can be tested.

The parsing behaviour of the existing typed methods is unchanged: unrecognized values still fail loudly.

Note that info now prints pumps, lights, locks and sensors as raw dicts rather than object reprs. location is still omitted unless --location is 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

…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>
@mdz
mdz merged commit e85d3e4 into main Oct 25, 2026
2 checks passed
@mdz
mdz deleted the raw-diagnostics branch October 25, 2026 23:28
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.

1 participant