Ha 110 no longer supports custom-ui?

there’s this post, already quoted above. https://github.com/kalkih/mini-media-player/issues/297 by @krocko
probably even more. And I have been following some core changes, so get notified on all these commits by following HA repo. Hence I new and talked about icon changes to Bram already, simply hadn’t realized it would have this impact.

Maybe the core team will offer us a solution somehow, let’s keep hope :wink:

Can you show a few examples? I did post in the button-card thread… some of mine look horrible now. I need to manually set the icon size and button size I think.

Often things like this are posted on the Developers blog and in the Discord channels for devs. Those making custom cards and integrations are more likely to be running the developer builds too, so they should hopefully spot things earlier in the process.

Otherwise they will get notified when people use the public beta and report issues to their repos. So that’s about one week lead time in the worst case scenario. Which I know is not great tbh, but that’s kind of the downside of super fast development (new HA releases every 3 weeks).

Those decisions aren’t really up to me, but generally speaking Core is intentionally kept simple and accessible. More advanced things with tons of customization options are typically left up to custom cards to tackle.

Not yet exactly what I want.

I added a line to button card:

icon:
  - padding: 12px 12px

Still need a bit more tweaking, and I need to find a way to get the FA icons working again.

1 Like

I really just want my icons the same size and ‘style’ as the core ones. Instead with this update all the icons are tiny and thebutton shrinks.
eg:
image
Button on right is button-card. Other 2 are core.
image
All of those are button-card and used to be higher (like the first one)
image
ditto this except the left 2 are button-card

Hm I have them set to a 1/1 aspect ratio. I don’t use core cards that much, but I believe it should give the same result. If not, you might be able to adjust the aspect ratio (e.g 2/1) or set fixed heights, though none of these options work perfectly with core cards I think. It’s a shame that the core button card has little options. As it is imho one of the most important card and should have more options.

I’m happy with the core cards and their size. I really don’t want to specify a height because that will depend on the device.
Setting 1/1 - tried that.
image
Looks like this!

How about 2/1? That should look more like what you had I guess? But yeah I understand the frustration.

I calculated it to be 1.6/1 and then I have to work out how to resize the icon. I was thinking Romrider will most likely fix it as it’s caused by 0.110.0 and it’s going to annoy a lot of people.

yeah, probably too early now. let’s wait and see.

1 Like

to get back to the original issue:

the template is still seen, but it can’t be set:

this is on 110.1b

created this frontend feature request:

btw, icon is still templatable using custom-ui, @Krocko as pointed out to me. So that’s some relief :wink:

1 Like

You have to understand that tagging is different for everyone. When you get upwards of 100 tags an hour it becomes rude. This is pretty much why the rule is in place. Some people don’t want that. Simple as that.

Understood, I was too slow withdrawing my post as I decided not to complain.

1 Like

not to stray too much from the original topic here, but only now do I notice you are showing a Moderator badge. Is that new, or did I miss it before?

It’s relatively new

2 Likes

congrats petro

1 Like

Icons now use mdc-icon-size instead of iron-icon-width so you can target that. And I think the “padding” is because there’s no display: flex

- type: custom:button-card
  styles:
    icon:
      [--mdc-icon-size: 2.2em, display: flex, align-items: center]

Add a custom_icons.js to resources as module and prefix your icons with custom:

async function getIcon(name) {

    if (name === "virus") {
      return {
        path: "M22.5 10.7h-1c-2.3 0-3.5-2.8-1.9-4.5l.7-.7c.5-.5.5-1.4-.1-1.9-.5-.5-1.3-.5-1.8 0l-.7.7c-1.7 1.7-4.5.5-4.5-1.9v-1c0-.7-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3v1c0 2.3-2.8 3.5-4.5 1.9l-.6-.7c-.5-.4-1.4-.4-1.9.1-.4.5-.4 1.3 0 1.8l.7.7c1.7 1.7.5 4.5-1.9 4.5h-1c-.7 0-1.3.6-1.3 1.3s.6 1.3 1.3 1.3h1c2.3 0 3.5 2.8 1.9 4.5l-.7.7c-.5.5-.5 1.4.1 1.9.5.5 1.3.5 1.8 0l.7-.7c1.7-1.7 4.5-.5 4.5 1.9v1c0 .7.6 1.3 1.3 1.3s1.3-.6 1.3-1.3v-1c0-2.3 2.8-3.5 4.5-1.9l.7.7c.5.5 1.4.5 1.9-.1.5-.5.5-1.3 0-1.8l-.7-.7c-1.7-1.7-.5-4.5 1.9-4.5h1c.7 0 1.3-.6 1.3-1.3s-.6-1.3-1.4-1.3h0zm-12 2a2.22 2.22 0 0 1-2.2-2.2 2.22 2.22 0 0 1 2.2-2.2 2.22 2.22 0 0 1 2.2 2.2 2.22 2.22 0 0 1-2.2 2.2zm3.7 2.6a1.11 1.11 0 0 1-1.1-1.1 1.11 1.11 0 0 1 1.1-1.1 1.11 1.11 0 0 1 1.1 1.1 1.11 1.11 0 0 1-1.1 1.1z",
      };
    }
  
    if (name === "roborock") {
      return {
        path: "M13.3 5.3c-.1 0-.2 0-.3.1-.1 0-.2 0-.4-.1-.1-.2-.3-.3-.6-.3s-.5.2-.6.4c-.1 0-.2 0-.3.1-.1-.1-.2-.1-.3-.1a.47.47 0 0 0-.5.5.47.47 0 0 0 .5.5c.2 0 .4-.1.4-.3h.2c.1.2.3.3.6.3.2 0 .5-.1.6-.4h.2c.1.2.2.3.4.3a.47.47 0 0 0 .5-.5c0-.3-.2-.5-.4-.5zM12 6.9a3.33 3.33 0 0 1 3.3 3.3 3.33 3.33 0 0 1-3.3 3.3 3.33 3.33 0 0 1-3.3-3.3A3.33 3.33 0 0 1 12 6.9zM12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm7.4 13.1c-.4 1-1 1.8-1.7 2.6a7.82 7.82 0 0 1-2.6 1.7c-1 .4-2.1.6-3.1.6s-2.1-.2-3.1-.6-1.8-1-2.6-1.7-1.3-1.6-1.7-2.6S4 13 4 12c0-.4 0-.8.1-1.1h4.3c0-.2-.1-.4-.1-.6s0-.4.1-.6h-4c.1-.3.2-.5.3-.8.4-1 1-1.8 1.7-2.6C7 5.5 7.9 5 8.9 4.6S11 4 12 4s2.1.2 3.1.6 1.8 1 2.6 1.7 1.3 1.6 1.7 2.6c.1.2.2.5.3.8h-4c0 .2.1.4.1.6s0 .4-.1.6H20c.1.4.1.8.1 1.1 0 1.1-.2 2.1-.7 3.1z",
      };
    }
  }
  
  window.customIconsets = window.customIconsets || {};
  window.customIconsets["custom"] = getIcon;
2 Likes

hey Mattias,

you seem very knowledgeable in these matters… might I persuade you to have a look at the state-card-custom-ui.html file , and see what in line 27 is causing the icon_color no longer to function because of the new way of handling icons in 110?
We have established that the icons themselves can still be templated using the js templates, like before, so I have hope that changing the script to the new method should be possible?

icon_color appearing on C 2835, 12607, 12731, 12925 and 13048
thanks if you could and would.

just as an update, posted this in the feature request, as further reason to have an alternative to custom-ui, since all the current card-mod stylings dont set the more-info in the entities, and only change the representation of them in the frontend cards.

imaging having to do things like this in each lovelace card:

  - type: custom:auto-entities
    card:
      title: Test auto coloring light level (lux) sensors
      type: entities
    filter:
      include:
        - entity_id: sensor.*_sensor_light_level_raw
          options:
            style: |
              :host {
                --paper-item-icon-color:
                 {% set level = states(config.entity)|float %}
                 {% if level == 0 %} black
                 {% elif level < 1 %} maroon
                 {% elif level < 300 %} firebrick
                 {% elif level < 10000 %} orange
                 {% elif level < 17000 %} green
                 {% elif level < 22000 %} gold
                 {% elif level < 25500 %} teal
                 {% elif level < 28500 %} dodgerblue
                 {% elif level < 33000 %} lightskyblue
                 {% elif level < 40000 %} lightblue
                 {% elif level < 40000 %} lightcyan
                 {% else %} azure
                 {% endif %}
                 ;
               }

and realize this is an easy card, with auto-entities. I gain having to do so on individual and hand picked entities in a more complex card…