-
-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Delete removed device(s) at runtime in Plugwise #118460
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
|
@coderabbitai review |
WalkthroughThe recent updates to the Plugwise component in Home Assistant focus on enhancing device management. A new constant Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant HomeAssistant
participant PlugwiseComponent
participant DeviceRegistry
participant EntityRegistry
User->>HomeAssistant: Initiates device removal
HomeAssistant->>PlugwiseComponent: Calls cleanup_device_and_entity_registry
PlugwiseComponent->>DeviceRegistry: Removes device entry
PlugwiseComponent->>EntityRegistry: Removes related entity entries
PlugwiseComponent-->>HomeAssistant: Completion of cleanup
HomeAssistant-->>User: Confirms device removal
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 (
|
9dc0f3d
to
7da35b9
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.
What about the entities of those devices?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
As far as I can see in testing these are automatically removed alongside the removed device(s) . |
3476fa5
to
dbbdb72
Compare
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
3d03fe2
to
3188ca3
Compare
After discussing with @joostlek I will change this PR to implement the methods used in the Tedee integration. |
Closed due to conflict. |
Proposed change
Implement automatic removal during runtime for Plugwise: when removing a device from for instance an Adam, the device will automatically be removed from 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: