Ha 110 no longer supports custom-ui?

just to be precise: this handles which changes? the handling of more-info in in HA 113? because I have my released version running in 113, and that works just fine. (that is customizing the entities, not the removing from more-info.)

This handles more-info in 0.113 using customize.yaml.

ok thanks. doesn’t seem to do anything on 112 though? I really hate these backward compatibility issues…grr

112 should be working, it is for me. Cache issue maybe?

I guess… just had a restart and it seems to work now. Nothing showing except for history. Which is per your work, so congrats!

It does hide all attributes templates of regular template sensors too though… which is really not desirable…

still, or better because of that, it would be my wish to have a selective option. before we had the eg icon_color template in view, and the attribute icon color itself below that. I needed that, to be able to check if the templates are working. My huge preference would be to hide the templates themselves, but show the attributes they customize.

in the old days, we could hide state-card-custom-ui (which of course now is no longer in use) to do so. Would you know of a way to reach the same goal in the new implementation? Hide the templates themselves, but still show the attributes? Would be perfect!

Nex step would be to cut all now defunct options for States, which are plenty in the current custom-ui still.

btw Id like to change the date format to yyyy-mm–dd

Are you using the global example that hides everything? You can selectively choose to hide whatever you like, including everything or nothing. If you wanted to see something, you would need to exclude the all from the global customize. My example provided above is not required, just an example. Here’s another:

Example (customize.yaml):

input_boolean.development:
  hide_attributes:
    - all

Example (customize_glob.yaml):

"*.*":
  hide_attributes:
    - editable
    - node id
    - id

Does that make sense? Not sure if I explained it thoroughly. It does exactly what you want it to do, just a poor explanation by me.

There are a lot of state based items in there, just not sure where to even start on that. I did look at the e.push issue and basically that portion just needs to be removed as far as I can tell. What current functionality is actively used. I only using icon and icon_color and am not familiar with much of the other current functionality.

What date format are you speaking of?

Yes I did use the all glob. Hoping it would hide all custom_ui templates. It works more thorough though :wink:

How then to hide only the templates, but show the attributes, like icon and icon_color, and, important, keep the attributes of the attribute_templates used in template sensors?

Concerning the date: I meant the date shown on the custom_ui versions, in inspector and in the configuration page /info

@Mariusthvdb: did you tried the following?

 "*.*":
  hide_attributes:
    - templates
    - icon_color

this is working for me.

Yes! It is working for me now here too.

I do see several entities for which I set an icon color directly (no template) in customize, without the attribute icon_color in the more-info.

Not even sure if this want there before, but strange it is . Will check some more.

@cab426 think this is now ready to merge don’t you think? Or at you still working on other details?

I will write a paragraph for the repo readme, or would you care doing so yourself?

Can merge this evening when I get back to my dev environment ,-)

Huge Thanks, this one was top of the wishlist as mentioned in the repo. Credits go to you!

I am comfortable merging at this point. Everything seems to be working on 0.112 and 0.113 without error, but I can’t speak to any lower versions. I’ll include supported HA versions in the readme. I’ll update my repo with the README.md changes and you can adjust and merge as needed.

Glad to get this working again, it was definitely something that I was looking for a solution to for a while.

cool, ive merged, and updated the readme.

1 question left: why confuse people with 2 repos concerning this matter?

I was just using mine as a dev/test repo. I look at yours as the primary. I’ll probably keep working through cleaning up the state artifacts and submit PR’s to your repo. TBH, I don’t want to ultimately own the code, just contribute. :grinning:

1 Like

thanks!
next to weeding out ‘States’ options, trying to re-add the theming for badges (and entities for that matter) would be high on the list. Ive checked several ha variable names and here, and they still seem to be used.

this was possible before:

    sensor.ha_update_available:
      state_card_mode: badges
      templates:
        unit_of_measurement: ${entities['sensor.ha_latest_version'].state}
        theme: >
          if (state == 'Yes') return 'green_badge';
          return 'grey_badge';

state_card_mode: badges obviously is no longer relevant, so should be taken out. unit_of_measurement still works, and the theme: doesn’t anymore…which is a pity really because though we can style the badges in Lovelace using card_mod, that is very complex. Setting a theme is way easier and more elegant imho.

green_badge:
  label-badge-red: green
  label-badge-background-color: white
  label-badge-color: grey
  label-badge-text-color: green

Hi @cab426

I now see that the icon_color is displayed in the more-info, but icon no longer I shown. Before the templates would be visible (now hidden per the new hide_attributes) but also the icon and icon_color set per these templates. I really would love to get that back (to be able to check the template correct operation), could you have another look why this is happening?

with this customization:

homeassistant:

  customize:
    input_boolean.announce_presence:
      templates:
        icon: >
          if (state == 'on') return 'mdi:account-voice';
          return 'mdi:voice-off';
        icon_color: >
          if (state == 'on') return 'gold';
          return 'steelblue';

and glob:

  customize_glob:
    '*.*':
      hide_attributes:
        - templates
        - editable

thanks!

If you are trying to get the template back, you need to remove in from the customize_glob.yaml. It is one of the attributes you are hiding.

OR you can look at it in the Developer Tools -> States. It is not hidden in there, just the more info popup.

no, I am not trying to get the template (back, not sure it did this before…), I want both icon and icon_color attributes to be displayed. I don’t understand why the value of the attribute icon isn’t displayed right now, since I dont ‘hide’ them in the glob.

Those are contained under templates (at least under 0.113). Not sure why you are seeing icon color or where that is even coming from - I see both icon and icon_color contained under templates and thus they would be hidden. Can you post a screenshot of the state of this entity from the developer tools? (That way I can see all attributes and templates of the entity and try to recreate it.)

sure:

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 :wink:

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. :smiley:

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 :expressionless:

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

some final configs on customize_glob.yaml

light.*:
  custom_ui_state_card: custom-ui
cover.*:
  custom_ui_state_card: custom-ui
sensor.*:
  custom_ui_state_card: custom-ui
switch.*:
  custom_ui_state_card: custom-ui
binary_sensor.openclose_8*:
  custom_ui_state_card: state-card-custom-ui
  templates:
    icon: "if (state == 'Open') return 'mdi:television'; else return 'mdi:television-off';"
    icon_color: "if (state == 'Closed') return 'rgb(193,193,193)'; else if (state == 'unavailable') return 'rgb(251,210,41)'; else return 'rgb(54, 95, 140)';"

However, after restarting HA, don’t see it loaded, in fact on “Inspector” can see below error
Screenshot 2020-12-03 233059

also my test sensor doesn’t change icon state as you can see…
Screenshot 2020-12-03 233143

would be great having your support folks.