home-assistant / frontend

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

The lovelace default_view randomly omits words from the entity names #5514

Closed ajayjohn closed 4 years ago

ajayjohn commented 4 years ago

Checklist

Expected behavior

The entire entity name should be displayed for all entities.

Steps to reproduce

  1. Add a ZHA entity and name it something like 'Dining Room - Lamp 1'
  2. Try to view this entity on the default_view lovelace page without modifying anything else.
  3. The entity name should read '- Lamp 1' with the initial text missing. However, if you view the details of that entity, the entire name is correctly displayed there.

Environment

Additional information

I have attached a video of this issue highlighting how some names are cut off, while others aren't. Though the browser window was resized to be smaller in the video, this is actually running on a MacOS computer with Brave browser. Resizing the browser window doesn't seem to change the issues's behavior.

HA_UI_Name_Issue

bramkragten commented 4 years ago

This is correct, if the header of your card already specifies Dining Room we assume you know the entities belong that room and don't show it in the entities name.

ajayjohn commented 4 years ago

Ah, I see. That does make logical sense. My only concern is that with this approach, some of the HA screens will be filled with illegible names like Lamp 1, Lamp 2 etc. for every room. The same goes for network maps and other representations that display the entity's name rather than it's ID. Attached below is an example of the ZHA view within the configuration section. Screen Shot 2020-04-09 at 6 12 00 PM

Further, having the name contain the room name too, helped in easily exposing these devices to a voice assistant like Google or Alexa. But this second point is not a blocker in any way as I can work-around it by manually defining an alias for each entity I expose.

Do you think this behavior can be made optional by any chance (via a config flag or something similar)?

ajayjohn commented 4 years ago

I take that back. ZHA does treat the device different from the individual entities under it. So it can name the devices something different from what the entities are called. This solves my problem. Thanks!