-
Notifications
You must be signed in to change notification settings - Fork 2.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
Allow entities table to delete helpers #22248
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Not all helpers are config entries, the old style helpers are collection type helpers, like the input helpers. These are not handled in this PR. |
Would it maybe make more sense to start adding this to the helper config page (multi delete)? |
Are you certain I didn't handle them? I thought I duplicated the same logic that more-info uses to determine deletability. e.g.:
|
I'd probably be up for that at some point, but I've already got another PR open for helper config with quite a few changes already. I do think it makes sense to add here though as well, if it's technically feasible. |
You would need: await HELPERS_CRUD[this.entry.platform].delete(
this.hass,
this._item.id
); These helpers actually have their own more info settings element |
Calling I wonder what the difference is with the other API method. But I'll attempt to add the code from that helper-tab file as well. |
So I did another pass through and I think I've covered all the cases, but this ended up being way more complicated than I originally anticipated 😅 . I imagine it's quite hard to review but since I went through the trouble I'll put it out there. |
I still have around 600 helpers that existed to test performance issues some months ago. The yaml configuration has already been remove, but they still remain in the entity table, marked as no longer existing with a red exclamation mark at the end. These were setup through yaml like this:
At current stable (not this branch), they can be deleted at this time with multi selection. On this branch, it appears to call right now with multi selection: |
Thanks for checking, I believe I have fixed that case. 👍 |
Yeah you did. 🥇 |
Proposed change
If you click on a helper more-info, you are allowed to delete it.
If you select a helper in entities table (w/ multi-selection) and try to delete, the popup tells you it can't be deleted.
This change allows the entities table delete flow to also delete helpers, so it is more consistent (and much easier to clean up large groups of unwanted helpers)
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: