Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change color icons based on state?('on' or 'off') #10

Closed
Kinnoon opened this issue May 15, 2022 · 8 comments
Closed

Change color icons based on state?('on' or 'off') #10

Kinnoon opened this issue May 15, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@Kinnoon
Copy link

Kinnoon commented May 15, 2022

  1. Can you add support for Change color icon when entity state change ?

and
2. Possibility to change from tap/click(hold) to tap/click entity to see detailed information

@Kinnoon Kinnoon changed the title Change color icon when entity state change('on' or 'off') Change color icons based on state?('on' or 'off') May 15, 2022
@junalmeida junalmeida added the enhancement New feature or request label May 16, 2022
@junalmeida
Copy link
Owner

junalmeida commented May 16, 2022

I will take this into consideration, however I believe you currently can achieve color change with https://github.com/Mariusthvdb/custom-ui

Could you please separate tickets, one ticket per feature request? thx

@kauelima
Copy link

+1 Just found this card and would love this feature. For light entities, it's great to have them yellow when on or even color matching the color of the light.

@junalmeida
Copy link
Owner

+1 Just found this card and would love this feature. For light entities, it's great to have them yellow when on or even color matching the color of the light.

Doesn't custom ui template glob do this job on any card?

@kauelima
Copy link

Doesn't custom ui template glob do this job on any card?

This adds an external dependency. It can work, but the ideal would be to have those main features baked in. I think custom colors are in fact something that can be left for external customization, but the stardand yellow for lights when on is something that the custom component should do by default.

@junalmeida
Copy link
Owner

I will take it into consideration; however, my initial intent is to keep this card minimalist, and if I add this feature, it will only be effective within the card itself.

The https://github.com/Mariusthvdb/custom-ui would make your entities work across all HA with minor effort like:

customize_glob:
  "light.kitchen_*":
    templates:
       icon_color: if (state === 'on') return 'yellow'; return 'white';

My advice is to try custom-ui as it may be a ready-to-use solution for you. It may take some time for me to prioritize feature requests but I appreciate you sharing your thoughts here, thx :)

@ibins1980
Copy link

Hallo ich habe custom-iu probiert aber es funktioniert bei mir nicht. Gibt es eine andere möglichkeit die Farbe zu ändern?

Danke und Gruß Danny

customize_glob: "light.*": templates: icon_color: if (state === 'on') return 'yellow'; return 'white';

@junalmeida
Copy link
Owner

@ibins1980 The only way today is custom-ui. Please double check if it is installed and properly running.

Please try one of the basic examples from the component to see if it is working:
https://github.com/Mariusthvdb/custom-ui

@zazu-sf
Copy link

zazu-sf commented Aug 27, 2022

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants