Make exclusion reason available in statistic-picker #28673
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
Was thinking about ways to help with statistic selection and a lot of users struggle when their entities unexpectedly don't show up for picking. I was thinking maybe we can have a way to better surface why entities don't appear in specific pickers.
This change is such that everything appars normal originally (excluded entities are hidden), but when you click the "Why isn't my entity listed" button in the statistic picker, instead of linking to a website, we simply reload the picker but this time showing all entities and incompatible statistics, but then show the reason why we exclude them (entity is already selected, wrong device class, wrong unit, or entity doesn't have statistics). If you then select the "Why" button again it still goes to the original doc website.
Not entirely convinced this is necessary, but will put it out for opinions.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: