Lovelace state_color for group entities

Seems like group entities are not getting state_color effect on Lovelace…
Groups provide a very convenient way to activate / deactivate several devices / automatons at once, so I use them often on my Lovelace cards.

So far I’ve been using the custom button card plugin but I would love to switch all to native with state_color support

1 Like

post your config for them, it should work.

I tried a number of ways that didn’t work, for example:

type: glance
card:
  state_color: true
entities:
  - entity: group.ac_automation
  - entity: switch.ac
  - entity: switch.rancilio_coffee_machine
  - entity: input_boolean.speech_notifications
  - entity: group.work_alerts

or

type: glance
state_color: true
entities:
  - entity: group.ac_automation
  - entity: switch.ac
  - entity: switch.rancilio_coffee_machine
  - entity: input_boolean.speech_notifications
  - entity: group.work_alerts

Same if I use “entities” rather then “glance”:

type: entities
entities:
  - entity: group.ac_automation
  - entity: switch.ac
  - entity: switch.rancilio_coffee_machine
  - entity: input_boolean.speech_notifications
  - entity: group.work_alerts
state_color: true

Input_boolean seems to be effected by state color property, but groups are not…

those are correct. If it’s not working, write up an issue. Don’t post here because the devs don’t look here.

I don’t see state_color anywhere in the docs for the glance card, are you sure it should be a valid option?

it should be working on the entities card though.

Yes, it should

I’ll try to open an issue,
Thanks!

Same here! state_color does not work:

2020-03-17_13h26_32

Have you found a solution yet?

Are you looking at the preview? Those warnings have been broken for some time. If you don’t have a red card on the right side, then the property is getting set regardless of the yellow text.

EDIT: I just verified, this 100% works in the preview, so you aren’t looking at the preview you are just reading the text:

Oh! Thx! Good to know! But still the color of the icon does not change:

2020-03-17_13h35_32

Anything else I have to do?

what kind of entity is that?

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.”