-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Add WS API for removing a config entry from a device #66188
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
Conversation
@@ -388,6 +412,7 @@ def entry_json(entry: config_entries.ConfigEntry) -> dict: | |||
"source": entry.source, | |||
"state": entry.state.value, | |||
"supports_options": supports_options, | |||
"supports_remove_device": entry.supports_remove_device, |
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.
We may not want to include this in all responses, we should maybe do an entry_json_extended
with all flags.
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.
Why not always include it?
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.
@bramkragten suggested it adds unwanted overhead to keep adding flags to the responses, many of which are only used in some special cases by the frontend. In this case, we only need to know this on the device screen.
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.
Ok.
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.
Device Registry is always kept in memory when HA is running. We should probably propose a slim version and use that in many places in the UI.
Looks good! Before we merge here we should have a frontend PR that is approved so we know that the frontend has what it needs. |
Frontend PR: home-assistant/frontend#11716 |
We should also document the new integration interface in the dev docs somewhere. Probably on the device registry page and perhaps at least a link somewhere in building an integration? |
Documentation PR: home-assistant/developers.home-assistant#1215
That sounds good, not sure where to add the link though? |
Yeah, maybe add a new page "Extra Features" under "Building Integrations"? Going off topic: I think that our split between the top level headers Architecture and Core are confusing. Many of the topic details described under Architecture are specific to Core. I'd like to move these details under Core and have a more comprehensive walk through there for how to build an integration. Only keep the broader picture under Architecture. |
Merge as soon as frontend PR is ready. |
Frontend PR done |
Proposed change
Add WS API for removing a config entry from a device
Type of change
Additional information
Checklist
black --fast 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
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: