Sitelet https://github.com/python-kasa/python-kasa/pull/1587
Skip to content

Use log-level debug for smartdevice query error reporting - #1587

Merged
rytilahti merged 1 commit into
python-kasa:masterfrom
rytilahti:fix/less_verbose_hotpath
Oct 12, 2025
Merged

Use log-level debug for smartdevice query error reporting#1587
rytilahti merged 1 commit into
python-kasa:masterfrom
rytilahti:fix/less_verbose_hotpath

Conversation

@rytilahti

@rytilahti rytilahti commented Oct 12, 2025

Copy link
Copy Markdown
Member

We are currently logging query failures to the error logger, which causes log spam if a device is intentionally unavailable.
This PR will change the log-level for connection errors to debug to silence this for common downstream scenarios.
A follow-up PR could be made to report connection errors (i.e., if no module can be queried) by raising an exception for downstream uses.

Related to home-assistant/core#143667

@codecov

codecov Bot commented Oct 12, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.73%. Comparing base (1a89a1c) to head (b50d69b).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1587   +/-   ##
=======================================
  Coverage   92.73%   92.73%           
=======================================
  Files         157      157           
  Lines        9630     9630           
  Branches      976      976           
=======================================
  Hits         8930     8930           
  Misses        499      499           
  Partials      201      201           

☔ 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.

@rytilahti
rytilahti merged commit c6dd715 into python-kasa:master Oct 12, 2025
18 checks passed
@rytilahti
rytilahti deleted the fix/less_verbose_hotpath branch October 12, 2025 17:56
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Oct 26, 2025
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Nov 10, 2025
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Jul 5, 2026
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