Fix all handling of connectionCache and cacheData in cli.py and add new fields to HomeDeviceData#660
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes crashes in the CLI related to incorrect handling of the ConnectionCache object and adds missing fields to the HomeDataDevice dataclass.
- Corrects variable naming from
cache_datatoconnection_cacheto reflect actual return types - Updates property access paths to use
connection_cache.cache_data.home_datainstead of directhome_dataaccess - Adds four new optional fields to HomeDataDevice that were being logged as missing
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| roborock/cli.py | Fixes variable naming and property access patterns for ConnectionCache throughout multiple CLI commands (discover, list_scenes, execute_scene, get_device_info) |
| roborock/data/containers.py | Adds four new optional fields (create_time, cid, share_type, share_expired_time) to HomeDataDevice to support new device data from Q10 VF+ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
allenporter
left a comment
There was a problem hiding this comment.
Please check out the CI failures, namely i believe the test snapshots need to be updated with --update-snapshot
|
Thanks for the feedback and for teaching me something new 💯 I had to set up uv and pytest in my environment. Updated commit-message and ran 'uv run pytest --snapshot-update' Should be good now :) |
|
Thank you @heikkih appreciate the fixes. |
Hi.
I'm doing some debugging with the CLI, to see what data I can get from my new Q10 VF+ (Model SS07 running the new B01-protoco, model-part SS)
Had some crashes in several methods due to the new ConnectionCache-handling, so fixed those here.
Also added some new fields in HomeDeviceData based on