CustomUI - discussion thread

did you try: if (state === 2) ?
can be confusing at times when to use quotes and when not…

I can’t seem to get the customUI to work.

I have the warning in the log file that the custom component for customizer has not been tested by Home Assistant so I know it is getting that from the Custom Components folder however when I try to do the following in my customize.yaml file nothing seems to happen:

sensor.kitchen_motion_sensor_burglar:
  friendly_name: Kitchen Motion Sensor
  templates:
    _stateDisplay: "if (state === 8) return 'Detected'; else return 'None';"
    icon: "if (state === 8) return 'mdi:run-fast'; else return 'mdi:walk';"

What might I be doing wrong?

I have this in my configuration.yaml file:

customizer:
  custom_ui: local

Hi, I’m pretty new to Home Assistant an I can’t get most Custom-UI features running even that I followed the documentation. Maybe someone can point me to the right direction?

I try to get something like this here from the Custom-UI docs:

But the sliders (and the ‘show_last_changed’ I also try to display) are not showing up (the light is of type ‘MQTT Light’):

Any ideas what could go wrong or what else I can try?


About my system:
I have HA 0.87.1 running with the newest Custom-UI from Github.

Home Assistant is installed without hass.io image through virtualenv on a ubuntu host in case this is important.

Custom-UI has been installed the local / automatic way described here:
https://github.com/andrey-git/home-assistant-custom-ui/blob/master/docs/installing.md

The files in .homeassistant/www/custom_ui/ are in the right place and the folders and files are owned an readable by the homeassistant user.
I also doule-checked that by testing if I can reach the files through http://<myip>:8123/local/custom_ui/state-card-custom-ui.html

This is my entry in the configuration.yaml:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Berlin
  # Customization file
  customize: !include customize.yaml

frontend:
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html
  themes: !include themes.yaml

And here my customize.yaml:

light.bogenlampe:
  custom_ui_state_card: state-card-custom-ui
  state_card_mode: single-line
  show_last_changed: true
  templates:
    entity_picture: if (state === 'on') return '/local/img/stand_on.png'; else return '/local/img/stand_off.png';

As you can see in the screenshot, the entity_picture feature works, the icon changes when I switch the light on and off.
So the customize entry itself seems to work and is loaded.

I also see the Custom-UI menu entry in the settings of Home Assistant and a log entry in java console in Chrome with the text ‘Loaded CustomUI 20190113’.
So I guess Custom-UI should also be loaded.

I’m new to Custom-UI too and I have similar configuration like @Thyraz and I also can’t make it work.
I can see the Custom-UI loaded in the HA Info, I don’t see any error in the log, but I can’t see any changes in the Lovelace UI.
When I go to Configuration > Customization I see this message:

The following attributes are customized from outside of customize.yaml
Possibly via a domain, a glob or a different include. 

And I see the show_last_changed checkbox enabled, so I believe that it should work.

My environment:

Hass.io version 0.87.1 installed from image to Raspberry Pi 1
Home Assistant version: 0.87.1
Lovelace mode: storage
Frontend JavaScript version: latest
Custom UIs: 20190113

configuration.yaml

homeassistant:
  customize_glob: !include customize_glob.yaml
  customize: !include customize.yaml

customizer:
  custom_ui: hosted

frontend:
  javascript_version: latest
  extra_html_url:
    - https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui.html
  extra_html_url_es5:
    - https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui-dbg.html

customize_glob.yaml

"*.*":
  custom_ui_state_card: state-card-custom-ui
  show_last_changed: true

customize.yaml

light.workroom_led_light:
  state_card_mode: break-slider
  stretch_slider: true

@andrey is this project still active, please? I see your last reply here 6 months ago (August 2018).

Thanks!

I just found that the Lovelace can be switched from storage mode to yaml mode, so I did that and made a restart and nothing happened. Custom-UI changes are still not visible :frowning:

its not that custom-ui doesn’t work per se, it’s HA, and Lovelace all the more, taking out customization support more and more unfortunately. You’ve found a few, there are more. You could check the regular HA interface it custom-ui is working properly.

Have a look:

HA 84.3 regular:

34

Ha 84.3 Lovelace:

13

HA 84.6 regular:

54

further upgrading takes out more options which aren’t yet in Lovelace… reason on this side not to upgrade yet…

the much used _stateDisplay customization has been taken out too, so no more

41

but this:

15

in regular HA that is, theming per entity isnt supported on Lovelace either:

03

Thanks for the info, so I’ll stick with the non-customized Lovelace for now and see what future will bring…

I wouldn’t say that Lovelace isn’t customizable, in fact I think it’s a lot more flexible and customizable. CustomUI doesn’t work with Lovelace, but there are probably hundreds of custom Lovelace cards that provide much of the same options and many more.

@andrey, it looks like a change in 0.90 affected your custom_ui config panel addition and it makes the entire config panel nearly unusable if custom_ui is enabled. I also just get a white screen when going into the Custom UI menu item, so it’s not usable either. Can you check it out when you have a chance?

https://github.com/andrey-git/home-assistant-custom-ui/issues/170#issuecomment-475479131

Just FYI - I forked your repo, commented out the line that adds the new entry in the config panel, rebuilt it, and nav is working for me now.

Hi,

Can I use custom_updater to update this component?

I can not install CustomUI. I followed the next steps but I did not succeed. I need help

You arent adding enough useful information for anyone to help you.

What do you mean that you didnt succeed? Logs?

What information is needed? I followed the instructions from here: https://github.com/andrey-git/home-assistant-custom-ui, but something is missing me.

It would be helpful to us to help you if you answered the questions I posted above.

How do you know that you didn’t succeed?

Can you please post any logs that would be relevant to the issue you are having from the homeassistant.log file found in your config directory?

@finity Thanks a lot for your time.
I changed this:

  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html

with this:

customizer:
  custom_ui: local

… and it works.

I have no idea what that even means since those are two different (but related) things but I’m glad you got it working.

Works with any of the settings. I do not know why it did not work from the beginning.

Hello Every Body
I use Custon UI for change color of icon and icon and it work fine
But I try to use it for slider of a hue lamp and I don’t use it ?
Here is my code in customize.yaml

light.spot_1_2:
      custom_ui_state_card: state-card-custom-ui
      state_card_mode: break-slider
      stretch_slider: true
      hide_control: false
      show_last_changed: false
      theme: happy
      confirm_controls_show_lock: true
      slider_theme:
        min: 10
        max: 255
        pin: true
        off_when_min: false
        report_when_not_changed: false  

IWhen i try to add the light with config UI for lovelace
witch code i need to use ?
I try

entities:
  - confirm_controls_show_lock: true
    entity: light.spot_1_2
    hide_control: false
    show_last_changed: false
    slider_theme:
      max: 255
      min: 10
      off_when_min: false
      pin: true
      report_when_not_changed: false
    state_card_mode: break-slider
    stretch_slider: true
    theme: happy
type: entities

doesn’t work
I try

type: entities
entities:
  - entity: light.spot_1_2

but it doesn’t work too

Can you help me please

Hello! Unfortunately, Custom UI works very unstable in HA 0.102 (appropriate issue has been created on Github). So I wonder if this very useful component will be updated soon.

1 Like

I want to be able to change the icon based on the state of an automation and an input bolean.

This works fine in my browser on my labtop and on my new iPhone. But on an old iPhone 5 I can not get it to work - neither in the IOS-app or in Safari. I have tried to clear the cashe.

Any sugestions on how to make this work?