Thanks for helping.
If you mean by de-intending this below, then I tried. ( for the record: ain’t no coding wizard here:))
style: |
host {
{% if is_state('binary_sensor.window4', 'Open') %}
--label-badge-blue: '#03A9F4';
{% endif %};
{% if not is_state('binary_sensor.window4', 'Closed') %}
--label-badge-blue: '#fd79a8';
{% endif %};
color: #fff;
}
As for the badges at the header, if I get it right “ha-state-label-badge” and “ha-label-badge” works if you want to change badges at the top of the dashboard. “host” is used in general to define badge customization. In short, I guess “ha-” cannot be used under picture-element card.
Seems like if “entity” is not in line with “style” it refuses to show anything. But even if I correct it, nothing happens, only shows the original blue.
Should I not use the label-badge-blue instead of red? >> Though it’s still not working. :I
Originally I wanted state-badges to change color on event from preset color (this varies) to red. I saw from other posts the example how to create that at the header section and tried to reuse it under picture-element.
Yes, that would be the point, but sadly it does not work, no matter which label-badge (-blue or -red) I use.
Is the problem with the code or the feasability inside picture-element?
Firstly, thanks for all the work you do on this and your other cards/plugins, a lot of us would have far more bland lovelace setups if it wasn’t for you.
I’ve just updated to 3.0.0 and have an odd behaviour, I read the updated readme about adding card_mod: before style: | and confirm those styles are being applied but ‘state’ color changes are not being applied to icons even though they’re outside of ‘style’;
I have a row of custom:button-cards as a header with the first showing day/night based on sun.sun, during the day the color changes based on the state of a binary_sensor from the openuv integration, this and the other buttons that change color depending on state are not working since the update.
Any assistance would be appreciated.
UPDATE: I’ve also confirmed it affects changing the icon color based on state on all custom:button-card instances with styling applied.
I saw a lot of examples with state-label, but when I apply the same customization below state.badge it don’t work for me. Are all the elements supported? THY