thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

Group icons (Lights) not changing state #169

Closed patrik-malina closed 2 years ago

patrik-malina commented 2 years ago

My Home Assistant version: 2021.07.3

Fold-entity-row version (FROM BROWSER CONSOLE): 20.0.4

What I am doing: creating folded group of lights

What I expected to happen: when any light turn on, state of group change to active (yellow)

What happened instead: it stays unactivated (blue icon). See pic included.

Minimal steps to reproduce:

# The least ammount of code possible to reproduce my error

# End of code

Error messages from the browser console:


By putting an X in the boxes ([X]) below, I indicate that I:

thomasloven commented 2 years ago

Is it a group entity or a light group? Following the template and including your configuration would have helped.

patrik-malina commented 2 years ago

It is a group of entities. As follows:

group.livingroom_lights:
name: Living Room Lights
icon: mdi:lightbulb-group
entities:
    - light.living_left
    - light.living_right
    - light.living_lamp

Lovelace code:

type: entities
entities:
  - type: custom:fold-entity-row
    head: group.livingroom_lights
  - entity: light.kitchen_light
  - entity: light.bathroom_light
  - entity: light.secondbathroom
  - type: custom:fold-entity-row
    head: group.kidsroom_lights
  - entity: light.stairs_light
  - type: custom:slider-entity-row
    entity: light.bedroom
    toggle: true
    hide_when_off: true
    secondary_info: brightness
  - entity: light.entrance
state_color: true
title: Lights
icon: hass:lightbulb-group

I hope it helps.

thomasloven commented 2 years ago

Then everything works as expected. The group entity does not change it's icon color because the default lovelace one does not. I recommend using a light group instead: image

patrik-malina commented 2 years ago

Thaks. I didn't know there light group exists. Need to study it 😏

thomasloven commented 2 years ago

https://www.home-assistant.io/integrations/light.group/ They have the same default icon as you used for your group entity. That's what had me confused.