Restore disabled entities to the statistics table #22411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
I want to make a case for a revert of #10677, which I don't quite understand the reasoning for. This PR will remove the filter for disabled entities in the statistics table, causing them to again be shown (with a corresponding FIX ISSUE).
If user has a disabled entity, and it still has data recorded in the statistics table, I think the user would like the opportunity to be able to clean that up to minimize unnecessary data in the table. Currently once an entity is disabled, it's records now remain forever orphaned in the table and you can't delete them.
I asked Tom (author of the original issue that spawned the original PR), and he said he's fine with reverting it now that he understands that if he "fixes" the issue, the entity will go away from the table. I guess he originally thought all disabled entities would always appear in the table, which is not the case.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: