Lovelace state_color for group entities

A script that runs approx 2 min.

Scripts are unique, being that they don’t have an on-off state unless there is a duration. This is probably a different issue all together.

I can confirm that plugs and lamps do work as expected!

Scripts do not. The script has delays in it. That’s why it runs for 2 min. I would like to see within the UI whether the script is running…

Yes, but if it’s a bug that it doesn’t appear then you have to wait for a fix or fix it yourself…

Since I don’t know how to fix it I’ll have to be patient…

Thx for your help!

groups arent working either

Use card-mod to add a css style to your group entity

          - entity: group.lights_inside
            name: Inside
            style: |
              :host { 
                --paper-item-icon-color:
                  {% if states('group.lights_inside') == 'on' %}
                    var(--paper-item-icon-active-color)
                  {% endif %};
              }
            tap_action:
              action: toggle

Group is in a glance card. This style will change the group icon color just like a switch icon.

3 Likes

I’m having the same issue with groups using the button card.

Basically, the icon doesn’t change colour.

entity: group.kitchen_lights
hold_action:
  action: more-info
icon_height: 70px
name: Kitchen
state_color: true
show_icon: true
show_name: true
tap_action:
  action: toggle
type: button

I’m also getting a message saying “Expected a value of type undefined for state_color but received true.”

Because state_color is not a valid field for button card. Check the docs.

I must be going mad???

Doesn’t it say it is an option here:

Nope, I’m going mad.

1 Like

There is definitely something funky going on here! Not massively sure on how I would raise this as an actual issue?!?

Came here because I have the exact same problem. For lights and switches it shows the state colour. For groups it does not. I have 3 smart bulbs in my kitchen light fixture so I have those 3 bulbs in one group called “Kitchen Lights” that I use on a button card. Unfortunately it doesn’t show the state colour everytime it is pressed on or off.

Any ideas?

I looked into this back when @Martin_Granger and found that groups never changed icon color. Even before the state_color was added. So this is expected behavior. You’re welcome to make a feature request about it. But the current reasoning behind this is: Groups do not always have the state ‘on’ or ‘off’ (they can be any state based on what’s in the group), and because of this it’s never been handled.

Thank you @petro . I will look into making a feature request.

I wonder if there is another way or idea to get around this instead of making a group?. I am making a tablet dashboard so its nice to link all three bulbs to the one button. I don’t want to make a button for each bulb for the one kitchen light fixture.

make a light group.

Thank you @petro !! Didn’t know light group was even a thing lol

was excited to see this. but too bad you can only make light group out of entities starting with “light.xxx”. i have sonoff to control my lights, and it all is considered as switch instead of light. so light group cant work.

turn it into a light

wow cool! is there anything that CANNOT be done in HA??? :rofl:

thanks @petro . this really helps OCD part of me that doesnt like seeing my group of light doesnt turn yellow when turned on.