home-assistant / ui-schema

A schema to define a user interface for Home Assistant.
Apache License 2.0
41 stars 6 forks source link

Group-On-State not supported in state-badge and therefore not supported in state-icon element #247

Closed ghost closed 5 years ago

ghost commented 5 years ago

@TheEggi commented on Sep 1, 2018, 9:34 AM UTC:

It seems as if the group state is properly supported in the picture-glance-card, but is not checked inside of the state-icon (state-badge.js).

Would it be possible to expand the state-badge from

/* Color the icon if light or sun is on */
    ha-icon[data-domain=light][data-state=on],
    ha-icon[data-domain=switch][data-state=on],
    ha-icon[data-domain=binary_sensor][data-state=on],
    ha-icon[data-domain=fan][data-state=on],
    ha-icon[data-domain=sun][data-state=above_horizon] {
      color: var(--paper-item-icon-active-color, #FDD835);
    }

To add another check for data-domain=group

    ha-icon[data-domain=group][data-state=on],

This issue was moved by iantrich from home-assistant/home-assistant-polymer#1623.

ghost commented 5 years ago

@iantrich commented on Mar 7, 2019, 8:15 PM UTC:

Sounds like an easy PR to submit ;)

ghost commented 5 years ago

@iantrich commented on Mar 9, 2019, 8:36 PM UTC:

Hmm, thinking of this a bit more, I'm not sure if I agree with this idea. As noted in the comment, the icon coloring is meant to represent light. A group doesn't fall into that notion. Perhaps a different "on"/"active" color would be suitable, but does not fall within these color at least.

iantrich commented 5 years ago

duplicate