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

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

Open sendorm opened 5 years ago

sendorm commented 5 years ago

Checklist

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.

Mariusthvdb commented 5 years ago

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

sendorm commented 5 years ago

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

Mariusthvdb commented 5 years ago

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

horacecar commented 4 years ago

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

eon123 commented 4 years ago

Any updates on this? thanks.

LupoCri commented 3 years ago

Hi. Any updates? Tnx.

sendorm commented 3 years ago

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

Mariusthvdb commented 3 years ago

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

LupoCri commented 3 years ago

Tnx