thomasloven / lovelace-fold-entity-row

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

no icon color when state change #182

Closed rhoddan closed 2 years ago

rhoddan commented 2 years ago

My Home Assistant version: 2021.10.6

Fold-entity-row version: 20.0.4

What I am doing: When switch on a light some (not all and it is working in other cards) of the icons not change color (based on state)

What I expected to happen: icons to change color

What happened instead: no colored icons

Minimal steps to reproduce: In "Utomhus section" it's only "Framsida takfot" which change color

type: entities
entities:
  - type: custom:fold-entity-row
    head:
      type: section
      label: Sovrum
    entities:
      - entity: sensor.sovrum_temperatur
        name: Temperatur
      - entity: sensor.sovrum_fukt
        name: Fukt
      - entity: cover.blindbedroom
        name: Rullgardin
        icon: mdi:blinds
      - entity: light.bedroom_roof
        name: Tak
      - entity: light.bedroom_window_wall
        name: Fönster
        icon: mdi:lamp
      - entity: light.light_bedroom_wardrobe_channel_4
        name: Garderob
        icon: mdi:wall-sconce-flat
      - entity: light.spot_bedroom_window
        name: Spot fönster
        icon: mdi:wall-sconce-flat
  - type: custom:fold-entity-row
    head:
      type: section
      label: Kontor
    entities:
      - entity: sensor.kontor_temperatur
        name: Temperatur
      - entity: sensor.kontor_fukt
        name: Fukt
      - entity: cover.coveroffice
        name: Markis
        icon: mdi:storefront-outline
      - entity: cover.blindoffice
        name: Rullgardin
        icon: mdi:blinds
      - entity: light.shellyplug_s_2016bd
        name: Garderob
        icon: mdi:wall-sconce-flat
      - entity: light.spot_office_window
        name: Spot fönster
        icon: mdi:wall-sconce-flat
  - type: custom:fold-entity-row
    head:
      type: section
      label: Vardagsrum
    entities:
      - entity: sensor.vardagsrum_temperatur
        name: Temperatur
      - entity: sensor.vardagsrum_fukt
        name: Fukt
      - entity: light.spot_livingroom_window
        name: Spot fönster
        icon: mdi:wall-sconce-flat
      - entity: light.livingroom_wall
        name: Fönster
        icon: mdi:lamp
      - entity: light.livingroom_sofa
        name: Soffa
        icon: mdi:ceiling-light
      - entity: light.livingroom_table
        name: Matsalsbord
        icon: mdi:chandelier
      - entity: light.livingroom_corner
        name: Hörn
        icon: mdi:ceiling-light
      - entity: light.spot_livingroom_roof
        name: Tak
        icon: mdi:wall-sconce-flat
  - type: custom:fold-entity-row
    head:
      type: section
      label: Kök
    entities:
      - entity: cover.coverkitchen
        name: Markis
        icon: mdi:storefront-outline
  - type: custom:fold-entity-row
    head:
      type: section
      label: Tvättstuga
    entities:
      - entity: sensor.tvattstuga_temperatur
        name: Temperatur
      - entity: sensor.tvattstuga_fukt
        name: Fukt
      - entity: cover.coverlaundry
        name: Markis
        icon: mdi:storefront-outline
  - type: custom:fold-entity-row
    head:
      type: section
      label: TV Rum
    entities:
      - entity: sensor.tv_rum_temperatur
        name: Temperatur
      - entity: sensor.tv_rum_fukt
        name: Fukt
  - type: custom:fold-entity-row
    head:
      type: section
      label: Garage/Lada
    entities:
      - entity: sensor.temperatur_ladan
        name: Temperatur lada
  - type: custom:fold-entity-row
    head:
      type: section
      label: Utomhus
    entities:
      - entity: sensor.temperatur_hillevik
        name: Temperatur
      - entity: sensor.hillevik_temperature_min
        name: Temperatur min
      - entity: sensor.hillevik_temperature_max
        name: Temperatur max
      - entity: sensor.lux_hillevik
        name: Lux
      - entity: switch.shed_wall
        icon: mdi:coach-lamp
        name: Friggebod
      - entity: switch.outside_back_roof_channel_1
        icon: mdi:coach-lamp
        name: Balkongdörr
      - entity: switch.outside_back_roof_channel_2
        icon: mdi:wall-sconce-flat
        name: Baksida takfot
      - entity: light.outside_front_roof
        name: Framsida takfot
        icon: mdi:wall-sconce-flat
      - entity: switch.outside_front_door_lamp
        icon: mdi:coach-lamp
        name: Framsida entrédörr
state_color: true
show_header_toggle: false

# End of code

Error messages from the browser console:


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

rhoddan commented 2 years ago

I think I found the difference. When it's a switch the color does not change. When use standard entities the color works fine for switches as well

Skärmavbild 2021-11-02 kl  21 43 13

rhoddan commented 2 years ago

Thanks for a great work! And also for the quick action to fix the bug