I’m creating a custom humidifier entity with a custom set of modes. It works but the custom mode’s icons in Mode dropdown in the more-info card show up with “dot” icons (I assume some default) and I’d like to set them to some custom icons but I have not been able to identify what property / def I need to override or set in my python code to accomplish this.
I’ve tried going through the docs on my own and also asked LLMs but the answers are always garbage. The manual search isn’t showing much.
thanks very much, interesting! so it’s not possible to do this programmatically? kind of need to hardcode it in that file? e.g. if i want to make it templetizeable, not possible?
I tried replicating this exactly in my custom component’s folder but it didn’ take. I also tried renaming entity_component to entity as well as being explicit about it being a humidifier domain but nothing worked
That’s exactly the page I was looking at but that’s woefully handwavy. I want specifics on exactly where to put the file, exactly what API to override to point to that file. It’s all super loose on details and clicking through the links doesn’t give me anything specific. Anyway, it’s good to see you’re pointing me to where I’ve been looking so the key is there. I’ve tried a few variations and none have worked.
If you really want a solution you can get there with card_mod. See below for what I have tested with fan_modes for climate. This sets both the selected icon and the icons in the fan_modes menu. Happy to provide any further assistance.]
Note the index into config.features may differ. In my case I have fan_modes as the 2nd feature. If it was the first your index will be 0, not 1 etc.
I think the issue is all those json mechanisms only work for very few attributes of specific domains. They just don’t work for the humidifier domain on the current version of HA at least. Very limited tool
Card mod doesn’t work for me because I also need the change to the more info popup card and I have no desire to replace it using eg browser mod. At this point that’ll be accumulating tons of complexity to solve a very minimal aesthetic issue
card_mod can work with more-info via theme. In this case I have adjusted fan_modes and icons to be in the jinja template for card_mod. This is actually easier in application, but more involved in that you need to use a theme.
card_mod theme yaml. Once everything is good you can remove the Jinja comment that sets debug to the template {# card_mod.debug #}
Note: ha-control-select-menu:nth-child(2) is the fan modes. You could style the hvac modes with ha-control-select-menu:nth-child(1) and adjust template to suit