CustomUI - discussion thread

@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?
cheers,
Marius

This is a warning for all custom components. None get special treatment.

Alright, thanks, just surprised me that even this component which seems to native to Home-Assistant raised the warning.

Otoh, it started issuing this warning whenever the window focus changes to the HomeAssistant instance:

2018-07-20 10:50:29 ERROR (MainThread) [frontend.js.latest.201807080] :0:0 Script error. And a system service_log/write called pop up each time.

I do use Ghostery (an adblocker) but have whitelisted the HomeAssistant instance. Is there a way to find the cause of this other than the browser inspector:

never mind. this was the reload cache. All well, thanks!

You had to copy files into config folder to install, native components are ‘just there waiting’.

I’m using :

homeassistant:
  customize_glob:
    "binary_sensor.motion_sensor_1":
      show_last_changed: true
      custom_ui_state_card: state-card-custom-ui
customizer:
  custom_ui: hosted
frontend:
  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-es5.html

and I’m getting :

2018-07-23 11:46:43 ERROR (MainThread) [homeassistant.loader] Unable to find component customizer
2018-07-23 11:46:43 ERROR (MainThread) [homeassistant.setup] Setup failed for customizer: Component not found.
[...]
2018-07-23 11:46:43 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

 - customizer

Please check your config., notification_id=invalid_config, service_call_id=140025532467296-1>
[...]
2018-07-23 11:46:43 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - customizer

Please check your config. @ 2018-07-23T11:46:43.355838+01:00>>

Any idea what could be wrong and is creating this error ?
I’m on HA 0.74.0 on docker.

Even odder…the custom card is working, I’m seeing the last_changed in that cell.

HI @andrey

could you think of any reason why the 0.75, and 0,75.1 Hassos won’t show the attribute last_changed any longer ?
I have this python script created sensor:

hass.states.set('sensor.family_home', count_home, {
    'custom_ui_state_card': 'state-card-custom-ui',
    'friendly_name': "Family Home?",
    'home': ', '.join(home),
    'away': ', '.join(away),
    'icon': whichIcon,
    'count_home': count_home,
    'count_away': count_away,
    'family_count': familyCount,
    'templates': { 'icon_color': icon_color },
    'show_last_changed': 'true'
     }) 

which worked fine up to 74.x

now correctly showing on Hassio .75.1 as:

2432

while Hassos .75.1 shows no last_changed:

4059

seems there are more custom-ui related ‘issues’, since ever time a page with customized items (have yet to find the exact ones) is loaded, the service system_log/write message appears, along with this error message:

2018-08-05 21:35:27 ERROR (MainThread) [frontend.js.latest.201808040] http://hassio-2.local:8123/frontend_latest/app-c65b4028.js:2:12760 TypeError: undefined is not an object (evaluating 't.length')

. This time it certainly isn’t a cache thing, I’ve reloaded and restarted the host, browsers et all after clearing caches.

thx,
Marius

Have you downloaded the customizer python custom component. The error says you didn’t.

You can just remove the

customizer:
  custom_ui: hosted

part

1 Like

show_last_changed works for me.

Try to set it on a regular (not python created) entity.

Also by the formatting (“Family home?” is not vertically-centered, the feature seems to be enabled. Maybe it is just grey-on-grey?

I have it on many regular entities , and working fine indeed. It’s just this entity that’s behaving unexpected since the update.

I’ve checked the formatting too, noticed the ex center also, but changing to default or any other theme does not make any difference .
Which of course is to be expected since it is a straight copy of the code, and that is showing fine on the Hassio machine…

Ive checked again, and confirm to have set the last_changed in the customization for all devices both on Hassos and Hassio, so that can be ruled out.

But notice the difference on the devices them selves, Hassio shows the last changed on the devices, Hassos doesn’t:

Hassos
04
Hassio
20

If it’s a hassos-specific issue there is not much I can do :frowning:

thanks @andrey, I am using the docker image of homeassistant, I didn’t add any specific python modules to it.
I’ve now commented out :

customizer:
  custom_ui: hosted

and it works without errors, thanks for that.

Should the documentation be amended, as I found that syntax on that page activating.md ?

I edited the documentation changing One to Only one

1 Like

Hmm not sure .
I now notice that in the HomeAssistant app neither Hassio nor Hasso show the attribute .

seems to go hand in hand with the previously mentioned front-end error:

http://hassio-2.local:8123/frontend_latest/app-c65b4028.js:2:32129 TypeError: undefined is not an object (evaluating 't.length')

each time i click an item with the missing attribute, this pops up.

Thanks for the edit @andrey, it makes more sense now :sunglasses:

@andrey
See https://github.com/home-assistant/home-assistant/issues/15852#issuecomment-410802738

Resolves the front end error.
Is this caused by custom-ui? If not please ignore.

Seems to have taken care of the attributes issue along the way:

also see https://github.com/home-assistant/home-assistant-polymer/issues/1550#issuecomment-410949612 for a solution being updated in the new Master

HI @andrey

would this be possible:

group.all_lights:
  hidden: false
  confirm_controls_show_lock: true 

Ive tried, but no result:

31

if not, please could this be a feature request?

@andrey I am running Custom UI as local on a RPI3, HassOS, to minimize data traffic and make my installation as autonomous as possible.

Is there a way to update the Custom UI code easily, with a push of a button running a script, with an addon, or something in that manner?

Now I regularly manually copy and paste the code and files to my installation. Since Custom UI is regularly updated, a one button update- or automatic update functionality as an option, would be so much more user friendly, and helping HA being up to date.

Any advise is appreciated.

see home-assistant-custom-ui/docs/installing.md at master · andrey-git/home-assistant-custom-ui · GitHub

you could easily create a script for that I suppose, to make it even easier… :wink:

Thanks!
As the N00b I am, always afraid to corrupt my HA installation using Linux commands, any advise how to do this, using a command line sensor or a script… Code suggestion is appreciated :blush:

The instructions for local update suggest installing the file “update.sh” to your homeassistant config dir.
If I want to put the “update.sh” file into “\HASSIO\config\www\custom_ui”,
how will the shell command be “$ .\HASSIO\config\www\custom_ui\update.sh”?

i don’t use that, I simply shell in to the system, then

cd /config hit enter
./update.sh hit enter

thats it

since @andrey s instructions are based on his /update script, which is based on the exact file location, I wouldn’t do that… better ask him if what you want is advisable, and if so, what the script would have to look like.

1 Like