#the 'light' state icon has changed in the most recent version and I don't like it. :)
1 messages · Page 1 of 1 (latest)
I'm assuming you're talking about in the Picture Elements card. I don't use it so my suggestion may not be optimal but it works. I would use card_mod to make the change like you're asking. (I imagine this could probably be done with a theme but I don't know enough of them to make a recommendation.) The downside about this suggestion: it would have to be applied to every light individually...
Here's the full YAML: ```yaml
type: picture-elements
image: https://demo.home-assistant.io/stub_config/floorplan.png
elements:
- type: state-icon
style:
left: 5%
top: 5%
entity: light.bed_light
tap_action:
action: toggle
hold_action:
action: none
card_mod:
style: |
:host {
{% set entity = 'light.bed_light' %}
{% if is_state(entity,'off') %}
--card-mod-icon: mdi:lightbulb-outline;
{% elif is_state(entity,'on') %}
--card-mod-icon: mdi:lightbulb;
--icon-primary-color: dodgerblue
{% elif is_state(entity,'unknown') %}
--card-mod-icon: mdi:lightbulb-question-outline;
--icon-primary-color: red
{% else %}
--card-mod-icon: mdi:lightbulb-alert-outline;
--icon-primary-color: orange
{% endif %}
}
yeah, it is the picture elements card, man. I have not touched this in so long (literally did it years ago).
Yeah, that was the number one thing I was trying to avoid, but at the same time.. yaml anchors would work I suppose. Why is the picture elements card changing its MDI icon's?
Like nothing here; https://www.home-assistant.io/changelogs/core-2025.8
It's the default off icon for light entity. It wasn't a change in picture elements.
https://github.com/home-assistant/core/pull/148749
Can you just pick an updated icon for the entity? That should override state icons.
It's the default off icon for light entity. Can you just pick an updated icon for the entity? That should override state icons.
Didn't realize that is what it was doing. The entity in the example above is from the Demo integration. My normal entities are already set to custom icons but the card I use handles the state icons.
I set light.bed_light's icon to mdi:lightbulb and it no longer shows the light bulb with the slash through it when off. The downside is, since it overrides the state icons, it doesn't have a different on icon.
Can something like this be set at the theme level? Something like --ha-state-light-on or whatever?
No, icons are not themable.
See, this comment; https://github.com/home-assistant/core/pull/148749#pullrequestreview-3016840169 +1
Seeing as it is all in the too hard basket, in about 6 weeks or so i'll probably stop caring. 😉
once I get used to it.
at least now I understand the motivation and can mostly get on board with ti
yaml anchors would work I suppose.
It would definitely help, but I didn't mention it just in case you wouldn't be open to the idea. Unfortunately, I could not get a config.entity to work with the card_mod, hence the hard-coded entity. At least you'd be able to anchor the IF portion of the card_mod.
because like, I have a lot; ..... just makes it so busy now. 🙂