Skip to content

Add RC06 router support - #470

Open
Lukhaas25 wants to merge 1 commit into
dmamontov:mainfrom
Lukhaas25:codex/add-rc06-router-support
Open

Add RC06 router support#470
Lukhaas25 wants to merge 1 commit into
dmamontov:mainfrom
Lukhaas25:codex/add-rc06-router-support

Conversation

@Lukhaas25

@Lukhaas25 Lukhaas25 commented May 20, 2026

Copy link
Copy Markdown

Summary

  • add RC06 to the recognized MiWiFi router model enum
  • add a config-flow regression fixture/test so RC06 init_info no longer hits the unsupported-router path

Fixes #409.

Validation

  • python -m py_compile custom_components/miwifi/enum.py tests/test_config_flow.py
  • JSON parse check for tests/fixtures/init_info_rc06_data.json
  • pytest target attempted locally, but the bundled Python environment does not include pytest/Home Assistant test dependencies

Summary by Sourcery

Add support for the RC06 MiWiFi router model and ensure the config flow recognizes it via tests and fixtures.

New Features:

  • Recognize the RC06 MiWiFi router model in the router model enumeration.

Tests:

  • Add a config-flow test and fixture to verify RC06 routers are properly handled during user setup.

@sourcery-ai

sourcery-ai Bot commented May 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds support for the MiWiFi RC06 router model and introduces a regression test/fixture to ensure the config flow correctly recognizes and sets up this model via the standard user flow.

File-Level Changes

Change Details Files
Extend router model enumeration to recognize the RC06 hardware variant.
  • Add RC06 constant to the MiWiFiRouterModel enum with associated identifier string
  • Document RC06 with its release date comment alongside existing models
custom_components/miwifi/enum.py
Add a regression test and fixture to validate user config flow for RC06 routers.
  • Introduce init_info_rc06_data.json fixture representing RC06 init_info payload
  • Add test_user_rc06 config-flow test that mocks LuciClient login/init_info using the new fixture
  • Verify RC06 path creates a config entry successfully and calls async_setup_entry once
tests/test_config_flow.py
tests/fixtures/init_info_rc06_data.json

Assessment against linked issues

Issue Objective Addressed Explanation
#409 Add RC06 to the supported MiWiFi router model enumeration so the integration recognizes RC06 as a valid router model.
#409 Ensure the config flow successfully sets up an RC06 router (i.e., RC06 no longer follows the unsupported-router path), with automated coverage where possible.
#409 Implement and/or verify support for the remaining RC06 operations listed as incomplete in the issue checklist (xqsystem/reboot, xqsystem/upgrade_rom, xqsystem/flash_permission, xqnetwork/set_wifi, xqnetwork/set_wifi_without_restart). The PR only adds RC06 to the router model enum and introduces a config-flow test/fixture. It does not modify or add any code related to the listed RC06 operations (reboot, upgrade_rom, flash_permission, set_wifi, set_wifi_without_restart), nor tests specifically covering those endpoints.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@JuanManuelRomeroGarcia

Copy link
Copy Markdown

Please check this message #422. This repository hasn't been updated in over 4 years. My repository is constantly being updated.

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.

Add supports RC06 (50 USDT reward)

2 participants