Skip to content
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

More config/entities status filters #20638

Merged

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Apr 26, 2024

Proposed change

I feel the current status filters are a little bit confusing/lacking in the entities table. I can understand how they came to be this way back when we used to have independent checkboxes for e.g. "show hidden entities", but now that these are presented as a filter they don't really work the same way that the other filters do, and I think this could be improved a bit.

For example, if one deselects all checkboxes and selects "Hidden", based on the behavior of the other filters one might expect it to only show the hidden entities. But instead it shows both all hidden and unhidden entities. There is no way to select only the normal/available entities either, as if you clear all the checkboxes for the exceptional states, then all entities are shown.

By adding a filter specifically for "Available", that allows us to select with more fine granularity what we want to see. (either see only available entities, or specifically hide the available entities).

I also add a filter for "Restored", just for completeness/consistency, as there are 6 statuses that we report in the status column, and that was the only last one that was missing.

This change also changes the prioritization a bit I think to behave more like other filters, given that I feel an entity can have multiple statuses, e.g. you can have a read-only + unavailable entity.

The previous behavior for a read-only unavailable entity I think was to show this only if both read-only AND unavailable were checked. Now this entity will be shown for either read-only OR unavailable is selected.

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@spacegaier
Copy link
Member

I completely agree with this proposal. When playing around with the filters, not having "Available" in there felt weird/confusing and I was about to raise an issue for that before I saw this PR.

@matthiasdebaat
Copy link
Collaborator

I agree. I would choose the label Enabled because it's the highest level and in the list the next option is Disabled.

@karwosts
Copy link
Contributor Author

Note I currently have them auto alpha sorted, so renaming to Enabled it would no longer be first in the list, if that was important to you.

Available is what is currently used in our code for a status that basically means "Any entity that is not any of the other 5 statuses". I agree it's not a great label for this state, but I struggled to come up with anything better.

@bramkragten
Copy link
Member

Available is not really a good name I think, hidden and read-only entities would be available, but will not show up?
Same for Enabled, an entity can be enabled but read-only (you cant even disabled those!).

The best name I can think of would be Normal or something 😅

@bramkragten bramkragten merged commit c99e0e8 into home-assistant:dev Apr 30, 2024
14 checks passed
@bramkragten bramkragten added this to the 2024.5 milestone Apr 30, 2024
@karwosts karwosts deleted the config-entities-status-filters branch April 30, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants