Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
sendorm opened this issue Jan 22, 2019 · 9 comments
Open
3 tasks done

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

sendorm opened this issue Jan 22, 2019 · 9 comments

Comments

@sendorm
Copy link

sendorm commented Jan 22, 2019

Checklist

  • I'm running the latest version of CustomUI (Update guide) or using a specific release that is not marked as "Broken".
  • I tried to force-refresh (Ctrl+Shift+R / Ctrl+F5) the browser
  • (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.

@Mariusthvdb
Copy link

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
Copy link
Author

sendorm commented Apr 3, 2019

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

@Mariusthvdb
Copy link

Mariusthvdb commented Apr 3, 2019

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
Copy link

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

@eon123
Copy link

eon123 commented Dec 12, 2019

Any updates on this? thanks.

@LupoCri
Copy link

LupoCri commented Apr 12, 2021

Hi.
Any updates?
Tnx.

@sendorm
Copy link
Author

sendorm commented Apr 12, 2021

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

@Mariusthvdb
Copy link

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
Copy link

LupoCri commented Apr 12, 2021

Tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants