Skip to content

fix: improve intellifire command reliability#338

Open
jeeftor wants to merge 1 commit intomasterfrom
feature/ha-friendly-network-layer
Open

fix: improve intellifire command reliability#338
jeeftor wants to merge 1 commit intomasterfrom
feature/ha-friendly-network-layer

Conversation

@jeeftor
Copy link
Copy Markdown
Owner

@jeeftor jeeftor commented May 1, 2026

Summary

  • add caller-owned aiohttp ClientSession support for cloud APIs without closing external sessions
  • apply explicit timeouts and SSL verification to library-created cloud sessions
  • add typed command errors for missing credentials, rejected cloud commands, and exhausted local retries
  • prevent optimistic cached state updates when command sends fail
  • document the unreleased behavior change in CHANGELOG.md

Tests

  • uv run pytest
  • uv run ruff check .
  • uv run mypy intellifire4py
  • commit hooks: pyupgrade, codespell, ruff, ruff format, mypy, ty, conventional commit

Home Assistant compatibility

Successful commands should continue to work. Failed commands now raise typed intellifire4py CommandError subclasses instead of silently returning, so HA should get a companion PR that catches those errors in entity command paths and raises HomeAssistantError with a clean user-facing message before bumping manifest.json.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 90.16393% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.60%. Comparing base (c0ce439) to head (2de4fea).

Files with missing lines Patch % Lines
intellifire4py/cloud_api.py 90.00% 2 Missing and 2 partials ⚠️
intellifire4py/cloud_interface.py 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #338      +/-   ##
==========================================
- Coverage   98.94%   98.60%   -0.35%     
==========================================
  Files          12       12              
  Lines        1044     1075      +31     
  Branches       73       77       +4     
==========================================
+ Hits         1033     1060      +27     
- Misses          4        7       +3     
- Partials        7        8       +1     
Flag Coverage Δ
unittests 98.60% <90.16%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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