feat: Add support for the AudioReactive usermod#2086
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds WLED AudioReactive usermod support by defining a data model for the feature, exporting it publicly, implementing a control method, and providing comprehensive test coverage for model deserialization and API integration. ChangesAudioReactive Usermod Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds first-class support for the WLED “AudioReactive” usermod, including state deserialization and a client API to toggle it.
Changes:
- Add
AudioReactivemodel and expose it onStateasaudio_reactive. - Add
WLED.audio_reactive(on=...)to toggle the usermod via/json/state. - Add unit tests for deserialization and request payload generation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_wled.py | Adds client-level test for posting AudioReactive enable/disable payload. |
| tests/test_models.py | Adds model tests for presence/absence of State.audio_reactive. |
| src/wled/wled.py | Adds audio_reactive() client method posting the usermod toggle. |
| src/wled/models.py | Introduces AudioReactive model and adds it to State with aliasing. |
| src/wled/init.py | Exports AudioReactive as part of the public package API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed Changes
This PR adds support for the AudioReactive usermod, which provides sound-reactive effects on WLED devices equipped with a microphone or receiving audio via UDP sound sync.
AudioReactivemodel, exposed asState.audio_reactive. It isNonewhen the usermod is not installed on the device, so existing devices are unaffected.WLED.audio_reactive(on=...)method to enable or disable the usermod.Related Issues
Summary by CodeRabbit