mattieha / slider-button-card

A button card with integrated slider
MIT License
433 stars 68 forks source link

State icons are not respecting customization of device classes AND opposite state colors #55

Closed olympia closed 3 years ago

olympia commented 3 years ago

Checklist:

**Release with the issue:1.5.1

Last working release (if known):

**Browser and Operating System: Version 91.0.4472.114 (Official Build) (64-bit) / W10

**Description of problem: I had to re-classify my Velux shutters as shutters in customize.yaml because they were classified as windows by defaults. Slider-button-card doesn't respect the re-classification and continue to display the window icon and the states of the window icons for open/close status.

The below screenshot shows the difference between default HS entity card with correct state icons and the slider-button-card with incorrect state icons.

It also look like that the state color is the opposite compared to the HA default, or am I miss something here?

image

Javascript errors shown in the web inspector (if applicable):

Additional information:

mattieha commented 3 years ago

This is now fixed in v1.5.2 Supported device classes for cover:

Fallback to window for other device classes.

For opposite state colors make sure icon.use_state_color is set to true.

olympia commented 3 years ago

This is great! Thank you! State icon works perfectly now according to the device class!

However, color of the state icon is still the opposite (I was already using icon.use_state_color set to true). I open a separate issue for this.