feat: expose prefer-cache to create_device_manager caller#719
feat: expose prefer-cache to create_device_manager caller#719allenporter merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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_cacheparameter tocreate_device_managerfunction signature with default value ofTrue - Updated function docstring to document the new parameter
- Parameter is passed through to the internal
discover_devicescall
💡 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.
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 |
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. |
No description provided.