Skip to content

Translate ESPHome API errors#49

Merged
puddly merged 4 commits intodevfrom
puddly/aioesphome-timeout
Apr 6, 2026
Merged

Translate ESPHome API errors#49
puddly merged 4 commits intodevfrom
puddly/aioesphome-timeout

Conversation

@puddly
Copy link
Copy Markdown
Owner

@puddly puddly commented Apr 6, 2026

Fixes #47.

aioesphomeapi has its own timeout error type and in general raises predictable errors. To ensure that we do not leak unrelated errors by accident (i.e APIConnectionError), this PR introduces a decorator and wraps all functions interacting with aioesphome in it.

I've expanded the host daemon program used for testing to allow enabling/disable Noise encryption at runtime which lets us test the encryption combinations more explicitly.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.92%. Comparing base (ab1214f) to head (2f2d615).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #49      +/-   ##
==========================================
+ Coverage   88.82%   88.92%   +0.10%     
==========================================
  Files          19       19              
  Lines        2757     2782      +25     
==========================================
+ Hits         2449     2474      +25     
  Misses        308      308              

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

@puddly puddly merged commit 0de289c into dev Apr 6, 2026
66 of 70 checks passed
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.

Wrap ESPHome timeout in TimeoutError

1 participant