-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Show all disabled helpers in config/helpers #23377
Conversation
Adding some more elaboration on the theory here: Current behavior I see is this: Disabled Input-Number Helper (YAML originated): Not Shown This is because when we subscribe to configEntries, only the last category of disabled entities is returned in the response. So instead of relying on what is returned by configEntries, to find all the disabled items I iterate at all the entries of the entityRegistry.
Any entry in the entityRegistry that is disabled, and has a platform which the manifest lists as a helper type, gets added to a separate list of disabledEntries that we show separately. The above almost gets everything, except for But for switch_as_x, I notice that disabled entities of switch_as_x are present in the configEntries return. So make sure those are included in the disabled list by the last line here: With the above, we now have a comprehensive list of disabled entities, which can be referenced by the applyFilters function. And now we have added to _getItems a separate loop of iterating the list of disabled entries. Because we do this, we no longer want to include disabled items when we are iterating |
type: e.platform, | ||
configEntry: undefined, | ||
entity: undefined, | ||
selectable: true, |
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.
selectable: true, | |
selectable: true, | |
disabled: true, |
@@ -191,6 +192,8 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) { | |||
|
|||
@state() private _stateItems: HassEntity[] = []; | |||
|
|||
@state() private _disabledEntries?: EntityRegistryEntry[]; |
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.
@state() private _disabledEntries?: EntityRegistryEntry[]; | |
@state() private _disabledEntityEntries?: EntityRegistryEntry[]; |
Proposed change
Fix inconsistent behavior for disabled helpers; current behavior is that disabled helpers created in UI are shown, but disabled helpers created in YAML are not shown.
This change makes it so that all disabled helpers are shown.
Also for the disabled entities that are currently shown, they don't work right for filtering. They can have labels & categories, but if you apply any label/category filter, they never pass the filter even when they should. This change fixes the filtering on disabled helpers.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: