Skip to content

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Dec 29, 2025

No description provided.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/devices/device_manager.py 90.15% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes the prefer_cache parameter to callers of the create_device_manager function, allowing them to control whether cached device data should be preferred over fetching fresh data from the API.

  • Added prefer_cache parameter to create_device_manager function signature with default value of True
  • Updated function docstring to document the new parameter
  • Parameter is passed through to the internal discover_devices call

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

Another way we can do this is just clear the home data cache before calling into the integration. WDYT?

@Lash-L
Copy link
Collaborator Author

Lash-L commented Dec 29, 2025

Another way we can do this is just clear the home data cache before calling into the integration. WDYT?

We don't want the cache cleared though right? as if we fail the home data call, we want to still try to setup

Copy link
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

Yes, sounds good.

@allenporter allenporter merged commit 1d098d6 into main Dec 29, 2025
14 checks passed
@Lash-L
Copy link
Collaborator Author

Lash-L commented Dec 29, 2025

Yes, sounds good.

It definitely makes the cache less helpful though. As we can get into a unfortunate situation where on startup we do a bunch of home data calls when theoretically the part that is stopping it from setting up is not the home data. But for now, it probably makes sense as is so users don't have to do anything crazy to get their new devices added.

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.

3 participants