home-assistant-custom-ui icon indicating copy to clipboard operation
home-assistant-custom-ui copied to clipboard

Per-entity theming does not affect top-of-the-page badges on 0.85.*

Open sendorm opened this issue 6 years ago • 9 comments

Checklist

  • [x] I'm running the latest version of CustomUI (Update guide) or using a specific release that is not marked as "Broken".
  • [x] I tried to force-refresh (Ctrl+Shift+R / Ctrl+F5) the browser
  • [x] (Optional, but recommended) I'm using Chrome or tried to reproduce the feature on Chrome.

Browser + Version: Opera 57 and iOS 12

CustomUI version: 20190113

Home Assistant release (hass --version): 0.85.1

The theming for top of the page badges were working on 84.6 but not anymore on 85.1.

sendorm avatar Jan 22 '19 14:01 sendorm

maybe you should rename this to:

Broken: theming to top of the page badges.

in my case even with badges created in python, which were always exempt of Hassio quirks...

still: please bring back theming for top of the page badges:

HA 84.3 Schermafbeelding 2019-04-03 om 14 19 22

HA 90.2 Schermafbeelding 2019-04-03 om 14 19 28

Mariusthvdb avatar Apr 03 '19 12:04 Mariusthvdb

I don’t think it will ever be done :( Changed most of my entries to bar-card.

sendorm avatar Apr 03 '19 12:04 sendorm

full example:

sensor:
  - platform: template
    sensors:
      levering_of_verbruik:
        friendly_name_template: >
          {% if states('sensor.netto_verbruik')|int > 0 %} Verbruik
          {% else %} Levering
          {% endif %}
        icon_template: >
          {% if states('sensor.netto_verbruik')|int > 0 %} mdi:import
          {% else %} mdi:export
          {% endif %}
        value_template: >
          {{states('sensor.netto_verbruik')}}

customizes like:

homeassistant:
  customize:

    sensor.levering_of_verbruik:
      state_card_mode: badges
      templates:
    ## instead of icon_color, now use theme
    #    icon_color: >
    #      if (state === 'Levering') return 'rgb(251, 210, 41)';
    #      return 'rgb(54, 95, 140)';
        theme: >
          if (state > 0) return 'orange';
          return 'green';
        unit_of_measurement: >
          ${Math.round(entities['sensor.calculated_bruto_verbruik'].state)}

Ha 84.3

Schermafbeelding 2019-04-03 om 14 36 23

Schermafbeelding 2019-04-03 om 14 40 16

HA 90.2

Schermafbeelding 2019-04-03 om 14 36 17

Schermafbeelding 2019-04-03 om 14 40 07

(as you can see the theming of the regular sensors in a card is back and alright, never mind the different values, caused by the time between the screenshots. Theming of the badges is gone, which is really a great loss, since they were very indicative in direct view) Hope this can be reverted. thanks

Mariusthvdb avatar Apr 03 '19 12:04 Mariusthvdb

hello, does anyone know if there's any update on this ??

horacecar avatar Jul 18 '19 16:07 horacecar

Any updates on this? thanks.

eon123 avatar Dec 12 '19 11:12 eon123

Hi. Any updates? Tnx.

LupoCri avatar Apr 12 '21 08:04 LupoCri

I’ve stopped using badges long time ago. Still have no idea why this was removed from HA.

sendorm avatar Apr 12 '21 08:04 sendorm

this whole repo is no longer supported, not does it work correctly in current Lovelace. A reduced and updated (hacked) version is available https://github.com/Mariusthvdb/custom-ui/

theming is not supported either, but you can use the card-mod styling for that https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/1308

Mariusthvdb avatar Apr 12 '21 08:04 Mariusthvdb

Tnx

LupoCri avatar Apr 12 '21 12:04 LupoCri