artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

how to change the icon color? #129

Open nezaking opened 1 year ago

nezaking commented 1 year ago

image

when i open the climate,the style is black.when i close it ,the color still black! how to change it?

image

i want to change this style

regevbr commented 11 months ago

https://github.com/artem-sedykh/mini-climate-card#hvac_mode

See the hvac_mode style property

Lips2000 commented 9 months ago

Hi there. I love this card because of the indicators!

I too am struggling with the icon color with state changes and have spent hours on the hvac_mode property and config section trying all sorts of things. Frustrated at this point.

Would you mind writing the sample code to accomplish this? To keep it a simple as possible:

If I could see this work, I am confident I could get the other modes figured out.

I would really appreciate it.

Thank you.

regevbr commented 9 months ago
type: custom:mini-climate
entity: climate.study
hvac_mode:
  style: "(value, entity) => ({ color: 'green !important' })"

You are probably missing the !important part to force the color please try that

Lips2000 commented 9 months ago

Any chance we can get sample code for the example I wrote above?

Would really appreciate it.

If undoable, I understand.

Thank you.

zimpie commented 8 months ago

!important does have no effect. Color works only in standby. At all other values the style-setting is ignored.

=> so there is no oprtion to change icon for all values?

type: custom:mini-climate
entity: climate.study
hvac_mode:
  style: "(value, entity) => ({ color: 'green !important' })"

You are probably missing the !important part to force the color please try that

regevbr commented 7 months ago

For me it works in non standby

image

KrX3D commented 6 months ago

thanks for that now my icon changed when it is off -> default in red:

hvac_mode:
  style: '(value, entity) => ({ color: value !== ''off'' ? ''red !important'' : ''grey'' })'