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

Feature request: map_state icon color #24

Closed
friendodevil opened this issue Jul 5, 2019 · 14 comments
Closed

Feature request: map_state icon color #24

friendodevil opened this issue Jul 5, 2019 · 14 comments

Comments

@friendodevil
Copy link

friendodevil commented Jul 5, 2019

Please add the capability to change icon color in map_state. This is important when changing state. It will be very useful

Thanks

@steven-hack
Copy link

steven-hack commented Jul 8, 2019

I'm also interested in this issue, because i'm currently experiencing the same problem.

I was wondering if there was a specific design choice for going for <paper-icon-button /> instead of <ha-icon /> when rendering? My only guess would be because of a possible action, but <ha-icon /> also supports an click event.

As <ha-icon /> supports an active state color, and is also automatically supported by theming, I'd say that would be the easiest/most clean solution to this problem? Ofcourse I don't know the history...

@friendodevil
Copy link
Author

right, would be great if color can be supported per button like when using Button-Card ( https://github.com/custom-cards/button-card)

@steven-hack
Copy link

I've created above PR which makes use of the official ha-icon component. This component already uses different colors for active state. You can also use this in theming to customize to your need, just use the css variable --paper-item-icon-active-color

Depending on the vision of @nervetattoo you might want to try card-mod for extended coloring purposes.

If he wants to add this kind of customization possibilities to the component itself, that would require a bit more work.

@wiuwiu
Copy link

wiuwiu commented Jul 15, 2019

I'm also interested in. It will be great to have an icon color depend on its state.

@WhistleMaster
Copy link

Any news related to @IIStevowII PR merged to the repository ?

@steven-hack
Copy link

The PR is still open, waiting for approval.

@nervetattoo
Copy link
Owner

I'm considering this. Problem is that I do not want this behavior myself, I prefer either changing icons based on state or simply using toggles. Active state color doesn't always work too well with the banner-card colors at least I choose.

Regarding using paper-icon-button @IIStevowII , I think my intention was to not have proper support for icons and buttons.

@WhistleMaster
Copy link

Maybe that could be an option, true or false, to show state color or not ?

@steven-hack
Copy link

steven-hack commented Aug 16, 2019

Maybe that could be an option, true or false, to show state color or not ?

It would certainly be possible to either choose ha-icon or paper-icon-button depending on a certain option.

@friendodevil
Copy link
Author

for dashboards its valuable to change icon based on state e.g.: ligh off (grey) light on (yellow)

@WhistleMaster
Copy link

Could it be added through #33 ?

@friendodevil friendodevil changed the title Icon color feature request: map_state icon color Aug 30, 2019
@friendodevil friendodevil changed the title feature request: map_state icon color Feature request: map_state icon color Aug 30, 2019
@WhistleMaster
Copy link

Any news regarding this issue ? Thanks !

@nervetattoo
Copy link
Owner

Basic support for map_state based control is added and will be in the next version

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants