andrey-git / home-assistant-custom-ui

Custom UI elements for https://home-assistant.io
https://home-assistant.io
MIT License
526 stars 97 forks source link

extra_badge displays sensor name or "none" on home assistant >0.84.3 (should be hidden) #164

Closed thecode closed 5 years ago

thecode commented 5 years ago

Checklist

Browser + Version: Chrome Version 71.0.3578.98 (Official Build) (64-bit)

CustomUI version: 20181217

Home Assistant release (hass --version): 0.84.6

Problem-relevant configuration.yaml entries:

homeassistant:
  customize: 
    cover.dining_room_shutter:
      custom_ui_state_card: state-card-custom-ui
      state_card_mode: break-slider
      slider_theme:
        pin: true
      extra_badge:
        - attribute: current_position
          unit: "%"

Problem-relevant Home Assistant log entries:

No errors

From home assistant version 0.84.5 and above the extra_badge sensor name or 'none' for attribute is displayed in card instead of being hidden

Home Assistant 0.84.6 sensor name is displayed: extra badge sensor: image

extra badge attribute: image

On Home Assistant 0.84.3 the name is not displayed: extra badge sensor: image

extra badge attribute: image

zz66 commented 5 years ago

I can confirm this bug on home-assistant 0.84.6

zhumuht commented 5 years ago

confirm this issue on home-assistant 0.84.6

andrey-git commented 5 years ago

0.84.6 made a change so that _stateDisplay is no longer customizable and empty friendly_name (which CustomUI uses to hide the name) is not supported.

The 2nd issue will be fixed in 0.85

Mariusthvdb commented 5 years ago

That is too bad really and again another major annoyance added to Lovelace not fully supporting the Custom-ui tbh...

Is there any chance a future update to the Custom-ui will bring the _stateDisplay back? Or might you have a suggestion how to do that in Lovelace itself ?

andrey-git commented 5 years ago

One day I'll add support for Lovelace. _stateDisplay is not coming back to non-Lovelace.

Mariusthvdb commented 5 years ago

Thx andrey, Is this breaking change documented somewhere in Ha Github or release notes?

I’d really like to contact devs to revert this, since stateDisplay is truly fundamental and not being able to customize that makes HA front end rather user unfriendly ..

thecode commented 5 years ago

The main problem with putting a text bellow the badge is that it creates more spaces between the entities in the group, on my example above I have 8 entities, the group card is almost double in size with the text, it create something that is almost unusable, maybe it is possible to add a new attribute to entities (on HA level), something like "hide_name" or similar?

thecode commented 5 years ago

Some good news, Updated to Home Assistant 0.85.0, if you use the extra_badge to add another sensor entity, you can set the sensor friendly_name to "" and things will go back to normal (Name will not appear and will also not occupy space in the UI), however extra_badge from attributes still shows "none"

andrey-git commented 5 years ago

I released 2019-01-13 which sets friendly_name to empty automatically, so now extra_badge should work again.

thecode commented 5 years ago

Thanks, this solve the issue