note: ive now added the icon_color to the hidden attributes, so no mistake there… Ive also tested with the previous release on my GitHub, and was sad to see only icon_color to appear too… so your edit didnt change it. Would be cool if it could though
as you can see here, the 2 bottom attributes in the more-info is what I would love to be able to realize
Thank you for this. I deleted my previous comment (now undeleted) because I found the same behavior in my environment. It looks like icon is just not displayed anymore, just icon_color. Not sure when that happened, but it doesn’t look like its me.
Hey there,
May I ask if your repo of custom-ui is working on HA 118, my question is due to being unable to load it, even following your very simple guide
copied custom-ui.js into www/custom-ui folder
added to configuration.yaml
homeassistant:
####################################################
# #
# Customize #
# #
####################################################
customize_glob: !include customize_glob.yaml
## light.*:
## custom_ui_state_card: custom-ui
## cover.*:
## custom_ui_state_card: custom-ui
## sensor.*:
## custom_ui_state_card: custom-ui
customize: !include customize.yaml
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Text to speech
and to ui-lovelace.yaml
resources:
- url: /local/custom-ui/custom-ui.js?v=20201120 #change this v-number on each update
type: module
bits anymore, they are no longer supported like that, please read up on the doc about only needing the custom_ui resource now.
the error in inspector is somewhat unexpected, because in the only customization you posted no ‘<’ is used. Do you have other customizations set elsewhere.
for readability please write as follows:
templates:
icon: >
if (state == 'Open') return 'mdi:television';
return 'mdi:television-off';
icon_color: >
if (state == 'unavailable') return 'rgb(251,210,41)';
if (state == 'Closed') return 'rgb(193,193,193)';
return 'rgb(54,95,140)';
and yes, custom_ui still works, even on HA 1.0b0
can you check and see the resource mentioned on the config/info page and in inspector?
What I can see on config/info it’s image below, cannot find information similar to post above., unless not seeing in right place, sorry, not yet an expert on HA, still getting more knowledge in daily basis.
but again, sorry for stupid question, since haven’t started on templates yet, my goal for now is simple, apply to all door sensors the same template, whenever status is either open, closed or unavailable, icon and color changes.
The code you shared shall be added on configuration.yaml ?
any help guidance on first putting custom-ui working and then setting a few examples, and I good to proceed on my onw.
2 thing need to be correct:
the install of the resource, and the yaml with the customization,
the install should be fine, unless you have the file in an other folder in your /config folder. can you show where you have it stored? and please show us a screenshot of the inspector console, that shows all custom cards, so we can check.
the customization should be in the configuration.yaml, depending on the organization of your files.
it should be under:
if I copy code and paste into a custom_test.js file size is much smaller.
Additionally, when looking at inspector, notice that can see sources from all resources but not when choosing custom-ui shows a completely different input.
In summary, here’s what I’ve after 2 tentative, one where copied raw code and created a file custom-ui.js and another where just downloaded you content release.
Doc is quite simple
file is on right place and bellow added on ui-lovelace.yaml
ressources:
- type: module
url: /local/custom-ui/custom-ui.js?v=20201120 #change this v-number on each update
however shows a different error on top (highlighted)
Just found out that code shown by Inspsctor comes from custom_components/customizer/services.yaml required to installed from original custom-ui Andrey-Git
Believe can be removed based on your repo, correct?