andrey-git / home-assistant-custom-ui

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

Themes set in Custom-ui not recognized in frontend Lovelace #163

Open Mariusthvdb opened 5 years ago

Mariusthvdb commented 5 years ago

Checklist

Browser + Version: Safari/Chrome/Firefox Mac Mijave

CustomUI version:

20181217 Home Assistant release (hass --version):

0.84.3 Problem-relevant configuration.yaml entries:

sensor.huidig_tarief:
  templates:
    icon: >
      if (state === '1') return 'mdi:numeric-1-box-multiple-outline';
      if (state === '2') return 'mdi:numeric-2-box-multiple-outline';
      return 'mdi:fire';
    theme: >
      if (state === '1') return 'green';
      return 'orange';
    _stateDisplay: >
       if (state === '1') return 'Laag';
       return 'Hoog';

and theme:

orange:
  primary-text-color: orange
  paper-item-icon-color: orange
  secondary-text-color: orange
  label-badge-background-color: white
  label-badge-text-color: orange
  label-badge-red: orange
  label-badge-border-color: orange

Problem-relevant Home Assistant log entries:

no log entries

Any errors from browser Javascript console:

please see: https://github.com/home-assistant/home-assistant-polymer/issues/2366 and https://community.home-assistant.io/t/lovelace-themes-custom-ui/81658/2

Lovelace schermafbeelding 2018-12-19 om 11 19 06

Regular HA schermafbeelding 2018-12-19 om 11 19 14

Lovelace More-info schermafbeelding 2018-12-19 om 11 29 18

gamer06 commented 5 years ago

Hi. Any news about this?? Thanks!

VirtualL commented 5 years ago

As far as I know Custom-UI Will not work at the new "Lovelace UI" , only in "States UI". more info at #139

horacecar commented 5 years ago

As far as I know Custom-UI Will not work at the new "Lovelace UI" , only in "States UI". more info at #139

Can we use this way? https://community.home-assistant.io/t/lovelace-custom-ui/65026/10


Got it running now…completely (lovelace and standard-UI) …without above mentioned workaround. (forget it :wink: )

Here’s a snippet out of my configuration.yaml:

customizer: custom_ui: local

frontend: javascript_version: auto extra_html_url:

Mariusthvdb commented 4 years ago

HI @andrey-git ,

Not sure if you're even keeping custom-ui up to date, (which I most sincerely hope), but would there be any chance you could make theme settings in custom-ui be recognized by Lovelace please?

I now they are still working, and showing in more-info, but the normal entities view doesnt reflect the set theme in custom-ui, since quite a long time now.

Hope you can have a look and fix it.