CustomUI - discussion thread


It worked! You’re a star

Now I just need a way to hide the sensor when there is no value :stuck_out_tongue_winking_eye:


HI @andrey, folks,

Is there a way we can customize the background-color of an individual card, and set it different and independent from the current theme?

something like:

      background-color: '#303030'

would be really nice to be able to set individual cards off against the reigning theme…
If not possible yet, Id like to file a feature request :wink:



Hi everyone,

I’m trying to take control of the default view, so am looking to use the hide_in_default_view: true. However, when I try to use it, I get an error when I validate the configuration. I tried searching the forums, but couldn’t find any references to people using this feature.

Invalid config for [group]: [hide_in_default_view] is an invalid option for [group]. Check: group->group->home->hide_in_default_view. (See /home/homeassistant/.homeassistant/configuration.yaml, line 118). Please check the docs at

I’ve also noticed that some of the time, when I go to the Configuration tab, the Custom UI entry doesn’t show up.

Currently using HA 0.69.1 with CustomUI 20180602.

Newbie Embarassing question

Hi @andrey,
please let me ask a combined question on both improvement…
can we have confirmable controls on a script, and combining, even when an action_name is set?



      action_name: Restart
      confirm_controls_show_lock: true 

If yes, cool! If not, would you consider it, and except a feature request?


another customizing request concerning the use of mdi:icons and their appearance.

please see for their advice how to proceed and see if custom-ui or hassio can be adapted to allow for positioning the icons like:


it all started with my request, which was met recently, for a dedicated mdi:desk-lamp 01 which id love to be able to flip horizontally for obvious reasons, having a right and a left desk-lamp…:wink:

could this be realized, and what would be the best way to proceed?



is it possible to change the icon color for locks? I have two zwave lock I want to be green if unlocked and red when locked.

Im able to use icon_color to change to red etc. but im not able to use If template to specify if unlocked show icon color green and locked red. The customize setting under is working but not if I use if template that I have working for sensors. Is it only supported for sensors?

friendly_name: Front Door
icon_color: red
friendly_name: Garage Door
icon_color: green


This is what I’m using to change icon color based on battery level, it should work for lock state too:

  device_class: battery
    hs_color: >
      if (state >= 66) {
      } else if (state < 66 && state >= 33) {
        return [30, 100];
      } else {
        return [0, 100];


Hi friends,
I Have heared so much good stuff regarding customUi i just had to try it.
I have followed the intructions and ran the as root and all worked just fine !
Than i wanted to activate it and inserted the following to the configuration.yaml
custom_ui: local

  • I have used the Configuration validation and all is good :slight_smile:

However whan i add the following to the customize.yaml file as suggested and used the Configuration validation the validation was seems to be stuck and erros apeared at the HA loggers:

custom_ui_state_card: state-card-custom-ui
custom_ui_state_card: state-card-custom-ui

2018-06-22 23:55:43 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/”, line 385, in start
resp = await self._request_handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/”, line 338, in _handle
resp = await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/”, line 88, in impl
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/”, line 68, in staticresource_middle…

has anyone has a clue what i have done wrong? am i missing somthing?
I am using HA 0.71.0 on a raspberian.

Thanks in advance for any suggestion!


I’ve got an issue with icons not loading since somewhere between 0.69 and current. Everything is currently up to date and cache has been flushed. It happens in an Chrome, Safari and Edge on desktop and mobile.

On first load of a page after starting browser or a forced refresh, if the first page only has custom cards on it, icons fail to load on the group menu at the top and also any used in the custom card. If you click where an icon should be at the top it will open the relevant group and, if that has any normal card in it, all the icons appear and the initial page will then display properly.

If I add any normal card, even with just one simple switch or sensor, to the page that only has a custom card, everything works correctly until it is removed again.

Initially I though it was the Tiles card as that was the only one I had on it’s own but further investigation shows it is definitely an error with any custom card, eg one of the weather ones.


Itay, did you figure it out?
The error message seem unrelated.
The glob should be:

      custom_ui_state_card: state-card-custom-ui


HI Andray,
I think I figured it just now following your response ( I have given up since I couldent get any help up to now :grinning:)
It looks to me the issue is a combination of wrong Activating instructions and me being a newbie :grinning:
In step 2:
“In the customize: section of configuration.yaml put custom_ui_state_card:…”
Which I belive should be directly under the homeassistant object and not the homeassistant ->customize object.

As I did so there’s no more errors or the validating script no longer hangs up.
Since I am a newbie let me know if I am correct and if so I will open an issue at the project to update the documentation.

Thanks buddy!


Is there a known compatibility issue with with the latest HASS? My customisations for changing the color of motion sensors and device trackers have failed when I upgraded. The GUI is super slow to start up presumably due to the amount of sensors that are failing with CustomIUI. This is the error in my log:

2018-07-02 23:39:14 ERROR (MainThread) [frontend.js.latest.201806250] https://{redacted} Uncaught TypeError: Cannot read property ‘applyThemesOnElement’ of undefined

I applied the

I’m using a theme in customize_glob.yaml:
theme: >
if (state === ‘on’) return ‘motion_badge’; else return ‘nomotion_badge’;

custom_ui_state_card: state-card-custom_ui
theme: >
if (state === ‘home’) return ‘home_badge’; else return ‘away_badge’;

And this is my frontend:
label-badge-blue: ‘#bf1b00
icon: mdi:walk
primary-text-color: ‘#629e51
label-badge-red: ‘#629e51
primary-text-color: ‘#DF4C1E
label-badge-red: ‘#DF4C1E

I guess it could be some sort of element has changed in the GUI and the code can’t find it but I don’t know enough of HASS to determine if this is the case.

  • J


Oh wow, just saw this.
HA 0.70.0 and CustomUI 20180521 issues #134

Cache was the issue. All good.


How can I use themes as presets for icon colors?
I’ve tried creating this theme for example:

      icon_color: "#cb8122"

And then set it to one of my sensors:

  theme: temp_hot

But the theme isn’t applied.
I know its possible to set the color directly but I want to have a theme/preset and not hard coded color.


I pushed a new version 20180713 that fixes two features broken in 0.73:
Column width and extra_badge from an attribute.


thank you very much!


sorry to get back to this, but no such luck on IOS?

still the service system_log/write called spam caused by TypeError: null is not an object (evaluating 't.substr')

and no badge…


Caching issue?


no, made sure it wasn’t. refreshed, rebooted, reloaded all. That is to say, I havent deleted and reinstalled the app on the iPhone.
Can have a go at that too, if necessary

thing is, after having updated the custom-ui this is what’s happening:

Aiocoap issues and errors about with spontaneous reboots as consequence …

because of this:

018-07-17 16:56:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.bureau fails
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/pytradfri/api/”, line 92, in _get_response
r = yield from pr.response
File “/usr/lib/python3.6/site-packages/aiocoap/”, line 816, in _run_outer
yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
File “/usr/lib/python3.6/site-packages/aiocoap/”, line 865, in _run
blockresponse = yield from blockrequest.response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/", line 196, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/", line 317, in async_device_update
    yield from self.async_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/light/", line 153, in async_update
    await self._api(self._group.update())
  File "/usr/lib/python3.6/site-packages/pytradfri/api/", line 152, in request
    result = yield from self._execute(api_commands)
  File "/usr/lib/python3.6/site-packages/pytradfri/api/", line 142, in _execute
    _, res = yield from self._get_response(msg)
  File "/usr/lib/python3.6/site-packages/pytradfri/api/", line 98, in _get_response
    raise RequestTimeout('Request timed out.', e)
pytradfri.error.RequestTimeout: ('Request timed out.', RequestTimedOut())
2018-07-17 16:56:44 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:56:46 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:56:51 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:56:57 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:02 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:06 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:10 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:13 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:18 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:23 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:33 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:40 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:47 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:51 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:57:58 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:58:04 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:58:15 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 16:58:27 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Adapt python script to also show automations

@andrey since 0.73 we receive notifications on using a Custom Component that might cause unstable Hassio systems.

Yesterday I setup a completely fresh HassOS system on a new Pi, installed your custom-ui and now receive this in the log:

2018-07-20 10:01:33 WARNING (MainThread) [homeassistant.loader] You are using a custom component for customizer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Isn’t Custom-ui authorized or tested by Home Assistant?