thomasloven/lovelace-fold-entity-row

card_mod not applied if "open: false"

ildar170975 opened this issue · 5 comments

My Home Assistant version: 2021.11.4

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

What I am doing:
apply a card-mod style for folded items

What I expected to happen:
the style is applied

What happened instead:
the style is applied only if open: true

Minimal steps to reproduce:

type: entities
title: card_mod & open
card_mod:
  style:
    fold-entity-row:
      $:
        div#items hui-text-entity-row:
          $: |
            hui-generic-entity-row {
              color: red;
            }
entities:
  - type: custom:fold-entity-row
    open: true
    padding: 0
    head:
      entity: sun.sun
    entities:
      - entity: sun.sun
      - entity: sun.sun
      - entity: sun.sun
  - type: custom:fold-entity-row
    open: false
    padding: 0
    head:
      entity: sun.sun
    entities:
      - entity: sun.sun
      - entity: sun.sun
      - entity: sun.sun

image

Error messages from the browser console:
no errors related to the card


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

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
  • Have made sure I am using the latest version of the plugin.
  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

This should be fixed in 2.0.12.

Seems to be solved!

perfect, thank you Thomas. Ildar and I spent the better part of the afternoon analyzing this, and I found an auto-entities group filter was the only way to solve it.

Can confirm we can now list the entities, and see proper spacing, direct, or as object with secondary_info.
perfect!

@thomasloven pardon the followup, but there's 1 thing happening now: on folds with the entities listed verbosely, the bottom entity is not getting all the vertical space it should and is clipped. With a simple icon/entity/state all on 1 line that is diffult to see (though noticeably less height is displayed below the entity and above the next fold):

Schermafbeelding 2021-11-20 om 13 21 43

but when using entity_picture,

Schermafbeelding 2021-11-20 om 13 20 00

or secondary_info

Schermafbeelding 2021-11-20 om 13 24 54

or double lined unit, it becomes clear immediately:

Schermafbeelding 2021-11-20 om 12 33 44

this doesnt happen when using auto-entities in the fold..

do you need a separate issue for this?

Yes please