-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Discover new device at runtime in Plugwise #117688
Conversation
Hey there @CoMPaTech, @frenck, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@mib1185 thanks for pointing out the Fritz-update on which this update is based on! |
@coderabbitai review |
WalkthroughThe changes enhance the Plugwise integration in Home Assistant by introducing a callback mechanism to handle the addition of entities asynchronously. This involves adding a new Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant HomeAssistant
participant PlugwiseIntegration
participant Coordinator
participant DeviceRegistry
HomeAssistant->>PlugwiseIntegration: async_setup_entry()
PlugwiseIntegration->>Coordinator: Add listener for new devices
Coordinator->>DeviceRegistry: Fetch device data
DeviceRegistry-->>Coordinator: Return device data
Coordinator->>PlugwiseIntegration: Notify new devices
PlugwiseIntegration->>PlugwiseIntegration: _add_entities()
PlugwiseIntegration->>HomeAssistant: Add entities
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 0
Outside diff range and nitpick comments (1)
homeassistant/components/plugwise/coordinator.py (1)
21-21
: Ensure consistent import grouping.Consider grouping all
device_registry
related imports together for better readability.
ea25431
to
4a73619
Compare
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.
One very small comment, otherwise looks good 👍
../Frenck
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
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, @bouwew 👍
../Frenck
Proposed change
Implement automatic updating during runtime for Plugwise: when adding a new device to for instance an Adam, the device will automatically be added to the integration in HA Core.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: