home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.97k stars 2.71k forks source link

Hidden entities are not hidden #22040

Open lindhe opened 1 week ago

lindhe commented 1 week ago

Checklist

Describe the issue you are experiencing

I have some devices with switch entities that I want to "show as Light" rather than as a Switch. When I do that, the Switch entity is marked as "hidden" in favor of the new virtual Light entity:

Screenshot showing the Switch configuration Screenshot of the device

Yet, both devices are visible when interacting with the device:

Screenshot showing the dropdown menu in a Script

Notice how both "Light" and "Switch" devices get listed. This clutters the UI and makes it harder to navigate.

Describe the behavior you expected

I expect that these Switch entities to not show up in Home Assistant by default in almost any view. The only exception, I think, should be when I go to the "Entities" list and disable the filter that filters out hidden devices.

Steps to reproduce the issue

  1. Have a Device with a Switch entity (or similar).
  2. Edit the entity and select "Show as Light" (or similar).
  3. Click update.
  4. Notice how the Switch entity is marked as "Hidden" and the Light entity is not.
  5. Go to a Script or Automation and do something with the Device.
  6. Scroll in the list of available actions and notice how both entities are shown in the list.

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 129.0.2

Which operating system are you using to run this browser?

Ubuntu 22.04

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

karwosts commented 1 week ago

Hidden I think only is intended to remove entities from autogenerated dashboard, it's not to hide it from all pickers.

Maybe that could be changed but I don't think that's the intention.

lindhe commented 1 week ago

You are probably right. To me, this is confusing and I think it would improve the user experience if we changed that. Scrolling that list of entities is really an edge case, compared to all the configuration one does for scripts, automations and dashboards (yes, I found it works the same in the dropdown for dashboards too).

matthiasdebaat commented 5 days ago

I agree that the labeling is confusing. The description tries to make it better, but from research we know that people don't read. A quick solution for now could be to change the label to Visible on default dashboard.

We're in the process of making dashboarding better. We're going to include this pain point.

karwosts commented 5 days ago

I know area card is one more place where this is used, so it's not only for visible on default dashboard.

lindhe commented 4 days ago

from research we know that people don't read.

So true! 😄

Sorry for me being ignorant here, but what's the "default dashboard"? Do you mean the autogenerated one? If that is what you mean: great, you've found another irregularity!

Then we have three places where "hide" does work:

Maybe the places where I have found that it does not work are all instances of the same functionality: picking entities from a drop-down list. If so, it would be interesting to look into the code that handles indexing of that list (I assume it's cached and not calculated each time a drop-down menu is shown).

Does anyone know where to start looking?