Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card-mod style is not modified on load with fold-entity-row #221

Open
jjprz opened this issue Mar 12, 2022 · 4 comments
Open

Card-mod style is not modified on load with fold-entity-row #221

jjprz opened this issue Mar 12, 2022 · 4 comments

Comments

@jjprz
Copy link

jjprz commented Mar 12, 2022

My Home Assistant version: 2021.3.3

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

What I am doing:
Styling Secondary Information with Card-mod

What I expected to happen:
change the style

What happened instead:
The style of the secondary information is not modified. When I display the arrow the style is applied but on load it is not.

Animation

        - type: custom:fold-entity-row
          head: 
            type: custom:multiple-entity-row
            secondary_info:
              entity: sensor.humedad_dormitorio
              name: "💧"
              unit: '%'
            entity: light.bano_dormitorio
            icon: fas:bath
            toggle: true
          card_mod:
            style:
              multiple-entity-row $:
                hui-generic-entity-row $: |
                  .info .secondary { font-size: 11px !important; color: white !important; opacity: 0.5; }

Error messages from the browser console: No error messages
With other older versions of fold-entity-row it works.

@jjprz
Copy link
Author

jjprz commented Mar 12, 2022

The problem only occurs when multiple-entity-row is in head

@ildar170975
Copy link

Probably same: #215

@ildar170975
Copy link

ildar170975 commented Apr 5, 2022

@jjprz
Try this code:

  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      secondary_info:
        entity: sensor.weather_home_met_temperature
        name: ❄️
      entity: sun.sun
      entities:
        - sun.sun
        - sun.sun
      card_mod:
        style:
          hui-generic-entity-row $: |
            .info .secondary { color: red !important; }
    entities:
      - sun.sun
      - sun.sun

image

Here card_mod is moved to the head level and the style is applied successfully.
If card_mod is located on the fold-entity-row level it works only in some conditions (check #215).
So, you issue seems to be a duplicate of #215 but has a good workaround.

@ildar170975
Copy link

ildar170975 commented Apr 11, 2023

Both variants work stable now:

type: entities
entities:
  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      secondary_info:
        entity: sun.sun
        name: ❄️
      entity: sun.sun
      entities:
        - sun.sun
        - sun.sun
    entities:
      - sun.sun
      - sun.sun
    card_mod:
      style:
        div#head multiple-entity-row $:
          hui-generic-entity-row $: |
            .info .secondary { color: red !important; }
  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      secondary_info:
        entity: sun.sun
        name: ❄️
      entity: sun.sun
      entities:
        - sun.sun
        - sun.sun
      card_mod:
        style:
          hui-generic-entity-row $: |
            .info .secondary { color: red !important; }
    entities:
      - sun.sun
      - sun.sun

image

I think the issue may be CLOSED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants