dmamontov / hass-miwifi

MiWiFi for Home Assistant
https://community.home-assistant.io/t/xiaomi-miwifi-component-for-tracking-devices-and-managing-routers/288734
Apache License 2.0
151 stars 14 forks source link

Add support for QOS Feature #243

Open ismdcf opened 1 month ago

ismdcf commented 1 month ago

Added ability to turn on and off the QOS feature.

Summary by Sourcery

This pull request introduces support for the QOS feature, allowing it to be toggled on and off. It includes updates to switch entity descriptions, availability checks, and adds corresponding test cases and fixtures.

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request adds support for the QOS feature, allowing it to be toggled on and off. The implementation includes new switch entity descriptions, API methods for toggling and fetching QOS data, and necessary data preparation methods. Additionally, tests and fixture data have been added to ensure the functionality works as expected.

File-Level Changes

Files Changes
custom_components/miwifi/switch.py
custom_components/miwifi/luci.py
custom_components/miwifi/updater.py
custom_components/miwifi/const.py
Implemented QOS feature support including switch entity descriptions, API methods, and data preparation.
tests/test_switch.py
tests/fixtures/qos_data.json
Added tests and fixture data for QOS feature.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.