• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alandtse / alexa_media_player / 22225386415
24%

Build:
DEFAULT BRANCH: dev
Ran 20 Feb 2026 01:11PM UTC
Jobs 1
Files 19
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Feb 2026 01:09PM UTC coverage: 23.798%. First build
22225386415

push

github

web-flow
perf: optimize boot with coordinator, caching and background tasks (#3344)

## Summary

- **Boot time reduced from ~10s to ~3s** by moving notifications
processing to background tasks (eliminates a 4s `asyncio.sleep` from the
critical path)
- Add `AlexaMediaCoordinator` with debounced refresh requests to prevent
API hammering during push bursts
- Add `AlexaRuntimeData` dataclass for type-safe account data storage
(parallel to legacy `hass.data` during migration)
- Add `DataCache` with TTL and max entries for API response caching
across refreshes
- Add `BootMetrics` for boot performance instrumentation at each startup
stage
- Fix `add_devices` crash when `include_filter`/`exclude_filter` is a
string or device name is None
- Fix cached boot to still fetch bluetooth, preferences, and DND state
- Fix `_valid_voice_summary` extracted to module level for use in both
coordinator refresh and background tasks
- Add `AlexapyLoginError` handling with relogin trigger in background
`last_called` updates
- Track all background tasks for proper cleanup on config entry unload

## Test plan

- [x] Deployed on production Home Assistant instance
- [x] Boot timing verified: login ~1.8s, API fetch ~0.4s, platform
loading ~0.4s, total ~3s
- [x] All 6 devices discovered with bluetooth and DND states
- [x] 12 switches + 19 sensors loaded correctly
- [x] Zero errors in logs after multiple restart cycles
- [x] Two rounds of code review completed and all issues addressed

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Exposed coordinator, metrics, runtime-state and metrics retrieval as
public integration APIs.
* Added boot instrumentation, per-step timing and a short-lived API
cache.

* **Refactor**
* Reworked runtime-state model and coordinator for debounced refreshes,
adaptive polling based on connection state, background processing, and
safer unload/cleanup.
* Added HTTP/2 lifecycle awareness and coor... (continued)

102 of 350 new or added lines in 5 files covered. (29.14%)

1133 of 4761 relevant lines covered (23.8%)

0.24 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
12
52.0
custom_components/alexa_media/coordinator.py
28
63.16
custom_components/alexa_media/runtime_data.py
51
36.25
custom_components/alexa_media/metrics.py
157
5.56
-0.26% custom_components/alexa_media/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 22225386415.1 20 Feb 2026 01:11PM UTC 19
23.8
GitHub Action Run
Source Files on build 22225386415
  • Tree
  • List 19
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22225386415
  • ee2ca11a on github
  • Prev Build on v5.13.0 (#22130326154)
  • Next Build on dev (#22225483228)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc