You should be able to also use lovelace-card-mode, but there is an issue
opened 12:59AM - 04 Jun 22 UTC
Home Assistant Core 2022.6.1
Home Assistant Supervisor 2022.05.3
Home Assistanā¦ t OS 8.1
Home Assistant OS running on VMWare VM on Windows 11
My lovelace configuration method (GUI or yaml):
GUI (created card via GUI but then used "show code editor" to edit card yaml)
What I am doing:
Using card-mod to change light entity icon based on state.
What I expected to happen:
Light entity icon to change based on state (on or off).
What happened instead:
Worked correctly in 3.1.4 but broken in 3.1.5. Tested switching back and forth between the versions and clearing browser cache.
**Minimal** steps to reproduce:
1. Update to card-mod version 3.1.5
2. Create a button card (in my case is within a grid) and link to an entity such light using provided code above.
3. Save and view card. Try toggling the card entity. Note that the icon does not change.
```yaml
# The least amount of code possible to reproduce my error
show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.kitchen_bar
card_mod:
style: |
:host {
--card-mod-icon:
{% if is_state(config.entity, 'on') %} mdi:ceiling-light-multiple
{% else %} mdi:ceiling-light-multiple-outline
{% endif %}
}
# End of code
```
Error messages from the browser console:
```
DevTools failed to load source map: Could not load content for chrome-extension://pccckmaobkjjboncdfnnofkonhgpceea/js/hls.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
```
Not sure if this is relevant since card-mod loads version 3.1.5 just fine.
---
**By putting an X in the boxes ([]) below, I indicate that I:**
- [X] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- [X] Have made sure I am using the latest version of the plugin.
- [X] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- [X] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
yes, but you can use 3.1.4 still its a longer standing bug, and Thomas hasnāt responded yet, so dont hold your breath, and find/use other ways listed above
Looks like the issue with card-mod icon is fixed in 2022.11.5
not sure about that.
hving updated to 2022.12 and the latest card-mod 3.2.0 the tab icons still are very fragile/unreliable:
even though the inspector shows the correct style:
which is set in in my card-mod-theme, I keep seeing this:
icon colors are reliable.