-
-
Notifications
You must be signed in to change notification settings - Fork 149
Add support for Deebot T9 AIVI (8kwdb4) #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Created new file for T9 AIVI, based on x5d34r.py
Add 8kwdb4
|
Warning Rate limit exceeded@edenhaus has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 8 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes in this pull request introduce a new file, Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (1)
tests/hardware/test_init.py (1)
289-289: Maintain the sorted order of device identifiersThe list of device identifiers appears to be sorted. Ensure that
"8kwdb4"is placed appropriately to maintain the order, which can help with readability and future maintenance.Apply this diff to reposition
"8kwdb4"in the list:assert list(DEVICES) == [ "1vxt52", "2ap5uq", "2o4lnm", "4vhygi", "55aiho", "5xu9h3", "626v6g", "659yh8", "77atlz", "85as7h", "85nbtp", "8kwdb4", "9ku8nu", "9s1s80", "clojes", # ... rest of the devices ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
deebot_client/hardware/deebot/8kwdb4.py(1 hunks)tests/hardware/test_init.py(1 hunks)
🔇 Additional comments (1)
deebot_client/hardware/deebot/8kwdb4.py (1)
95-198: Verify the completeness and accuracy of device capabilities
The capabilities defined for the DEEBOT OZMO T9 AIVI seem comprehensive. However, please verify that all capabilities are accurate and align with the device's supported features. Specifically:
- Fan Speeds: Ensure that the fan speed levels specified (lines 125-130) are supported by this model.
- Water Amount Levels: Confirm that all water amount types (lines 190-195), including
WaterAmount.ULTRAHIGH, are applicable to this device. - Life Span Components: Check if all life span components listed (lines 133-138) are correct for the T9 AIVI, especially
LifeSpan.UNIT_CARE.
You can run the following script to cross-reference the device's capabilities with the existing documentation or data sheets:
✅ Verification successful
Let me try a different approach to verify these capabilities.
Let me try one more search to find the enum definitions for FanSpeedLevel and WaterAmount.
Device capabilities are correctly defined and consistent with the codebase
The verification confirms that all capabilities defined in the device configuration are accurate:
- Fan Speed Levels (QUIET, NORMAL, MAX, MAX_PLUS) match the defined enum values in
fan_speed.py - Water Amount Levels (LOW, MEDIUM, HIGH, ULTRAHIGH) align with the enum values in
water_info.py - Life Span components (BRUSH, FILTER, SIDE_BRUSH, UNIT_CARE) are valid and supported according to the
LifeSpanenum
The configuration also matches similar models in the codebase, as seen in the zjavof.py comparison.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify device capabilities for DEEBOT OZMO T9 AIVI
# Check supported fan speeds
echo "Supported Fan Speeds:"
grep -rnw 'deebot_client/capabilities' -e 'FanSpeedLevel'
# Check supported water amounts
echo "Supported Water Amounts:"
grep -rnw 'deebot_client/capabilities' -e 'WaterAmount'
# Check supported life span components
echo "Supported Life Span Components:"
grep -rnw 'deebot_client/events' -e 'LifeSpan'
Length of output: 579
Script:
#!/bin/bash
# Search for enums and their values
echo "=== Fan Speed Levels ==="
ast-grep --pattern 'class FanSpeedLevel(str, Enum):
$$$'
echo -e "\n=== Water Amount Levels ==="
ast-grep --pattern 'class WaterAmount(str, Enum):
$$$'
echo -e "\n=== Life Span Types ==="
ast-grep --pattern 'class LifeSpan(str, Enum):
$$$'
# Search for other device models to compare capabilities
echo -e "\n=== Other Device Configurations ==="
fd "\.py$" deebot_client/hardware/deebot/ --exec grep -l "DEVICES\[short_name(__name__)\]"
Length of output: 3199
Script:
#!/bin/bash
# Search for enums in all Python files
echo "=== Fan Speed Levels ==="
rg -A 10 "class FanSpeedLevel" --type py
echo -e "\n=== Water Amount Levels ==="
rg -A 10 "class WaterAmount" --type py
# Let's also check a similar model's configuration for comparison
echo -e "\n=== Similar Model Configuration ==="
rg -A 10 "FanSpeedLevel\." deebot_client/hardware/deebot/zjavof.py
Length of output: 1961
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #630 +/- ##
==========================================
+ Coverage 86.55% 86.68% +0.12%
==========================================
Files 89 90 +1
Lines 3333 3365 +32
Branches 298 298
==========================================
+ Hits 2885 2917 +32
Misses 394 394
Partials 54 54 ☔ View full report in Codecov by Sentry. |
edenhaus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @townsmcp 👍
|
For the T9 AIVI eu #624, I did a Symlink to the T8 AIVI, and not a copy/paste #612 (comment). |
@Yterz there are pro's and con's for doing a symlink - pro's are less maintenance in the future/inherit updates that are pushed to the original config, but con's are if an update is pushed to the original config that are not compatible with the other symlinked models there is a chance you can kill the integration for those linked model completely |
|
Do I correctly conclude that this fix will now also work for the EU version of the T9 AIVI (device code 659yh8) given the created symlink? |
|
I'm fine with both (symlink or coping the file). I personally use a symlink if the file is identical and will copy it if the file is different than the other models but @townsmcp reasons are also correct (and accepted) |
@BloodyusHellus I dont think it would. My PR is for 8kwdb4 model. However @Yterz has submitted PR #624 (comment) which covers your model |
Ah yes I see now, sorry for the confusion and thank you for your response :) |
Adding PR to enable Deebot T9 Aivi (CN model/AliExpress) to work.
Will close out #607 (comment)
Summary by CodeRabbit
New Features
Tests