I accomplished this using card-mod:
I only add these lines under an entity that the card wants to use the color value provided by the device. This ignores that and sets it to the same colors used by other entity icons on the card. This is for a set of lights hanging from porch pillars (their ‘curtain’ type).
- entity: light.pillars
icon: mdi:pillar
card_mod:
style: |
:host {
--card-mod-icon-color: {% if is_state(config.entity, 'on') %} rgb(var(--rgb-state-switch-color)) {% else %} var(--state-icon-color) {% endif %};
}
I only need to do this (well, currently anyway) to just some Twinkly holiday lights. I’d be tempted to see if I could alter the device code for the lights themselves to not report the color value, and thus not have to add the code on cards. It’s not like a multi-color light string is even going to HAVE a single color to report, so it’s sort of annoying to have to work around it this way, but c’est la vie.