šŸ”¹ fold-entity-row - Hide away stuff in entities cards

It was definitely an issue with 2021.6ā€¦ Iā€™d say you have a caching issue. Latest HACS fixes caching by adding a version to the end of the resource URL. If you donā€™t use HACS did you manually change the version in the resource?

Slightly off topic butā€¦
I havenā€™t ā€˜usedā€™ HACS for a while (i.e. not added anything) but have just kept it up to date.
When did this behaviour begin?

And more fundamentally, are you saying that HACS adds the URL to your resources automatically? If so, where does it do this? I have always added them manually to a resources.yaml file.

Sorry for the basic questionsā€¦

Yes it does and has done so for many versions now.

Configuration / Lovelace Dashboards / Resources.

Open your Home Assistant instance and show your Lovelace dashboard config.

Ok, I am slightly confused, please bear with me :wink:

Firstly Iā€™d never noticed Configuration / Lovelace Dashboards / Resources :blush:
(I donā€™t use the UI much)

With that said, I currently have this in my config.yaml

lovelace:
  mode: yaml
  resources: !include lovelace/resources/resources.yaml

My resources.yaml has the various URLs

- url: /hacsfiles/button-card/button-card.js
  type: module

Clicking on a URL in ā€˜Configuration / Lovelace Dashboards / Resourcesā€™ gives me this:

image

Do I have a redundant resources.yaml file?

Bonus question:
I have some fonts in resources.yaml

- url: https://fonts.googleapis.com/css?family=Oswald
  type: css

If the file is redundant for HACS (and I can delete the URLs from it) will it still be read for my fonts?

If you are using YAML mode you have to manage the resources yourself. So no, it is not redundant.

Not sure about the fonts.

1 Like

You can still use yaml for the resources BUT if you update a card you MUST add a version to the URL - see the cards docsā€¦ otherwise you will be banging your head against a wall to break the caching of the old version

1 Like

I hit F12 on my Home Assistant dashboard and noticed that I was getting a few messages like this:

image

You are doing it wrong:
Fold-entity-row should only EVER be used INSIDE an ENTITIES CARD.
See https://github.com/thomasloven/lovelace-fold-entity-row/issues/146

I see 6 of these messages when I load my frontend without a cache but I think Iā€™ve only used it once. There are six collapsible items in my list so maybe thatā€™s why. Can any of you see what Iā€™m doing wrong?

card:
  show_header_toggle: false
  title: All groups
  type: entities
  state_color: true
filter:
  exclude:
    - entity_id: group.zm*
    - entity_id: group.input_hs_wd200*
    - entity_id: group.opensprinkler*
    - entity_id: group.pihole*
  include:
    - domain: group
      options:
        type: custom:fold-entity-row
type: custom:auto-entities
sort:
  method: none

Iā€™m thinking it doesnā€™t like the custom:auto-entities being on the outside but I want all the items to be collapsed. It looks like this:

image

Thanks!

You are using fold entity row inside a custom:auto-entities card.

It should only ever be used in an entities card. From the docs:

Thanks @tom_l, any suggestions on how to keep the format but do it ā€œby the bookā€?

Actually, I think you can ignore the error.

Also from the docs:

Your card config conforms to this example:

Report it as a false error in the card repository issues. https://github.com/thomasloven/lovelace-fold-entity-row/issues?q=

1 Like

I am trying to add a fan-button-row in a folding entities card.

The two lamps work but the fan at the buttom throws the error ā€œentity not availableā€

type: entities
entities:
  - type: 'custom:fold-entity-row'
    head: light.master_bedroom_ceiling_fan_light
    entities:
      - light.mike_s_bedroom_lamp
      - light.darci_s_bedroom_lamp
      - type: 'custom:fan-mode-button-row'
        entities:
          - fan.master_bedroom_ceiling_fan
title: Master Bedroom

But the Fan card alone works

type: entities
title: master ceiling fan
show_header_toggle: false
entities:
  - entity: fan.master_bedroom_ceiling_fan
    type: 'custom:fan-mode-button-row'
    name: Master Bedroom Fan

I am new to YAML, any help appreciated.

Try this:

type: entities
entities:
  - type: 'custom:fold-entity-row'
    head: light.master_bedroom_ceiling_fan_light
    entities:
      - light.mike_s_bedroom_lamp
      - light.darci_s_bedroom_lamp
      - type: 'custom:fan-mode-button-row'
        entity:
          - fan.master_bedroom_ceiling_fan
title: Master Bedroom

I know nothing about the fan button row card you are using but you used ā€œentitiesā€ in the first example that did not work and ā€œentityā€ in the second example that did.

Now there is no error but that fan isnā€™t showing

Thanks for the help @tom_l. I read this entry in the repo and I think Iā€™ll just ignore it for now, I think he was addressing this issue specifically with the entry.

Yeah but with the exception he noted in the doc that I posted above.

Actually, I saw his little triangle on the github post and then looked at the source. Thereā€™s a little hint in there. :smiley:

I donā€™t get the message anymore.

Love this function, but how did I screw this up where the entity doesnā€™t have a window background?chrome_kFEiHsJlSF
Some of my code:

type: vertical-stack
cards:
  - type: custom:fold-entity-row
    head:
      entity: light.all_lights
      name: ALL LIGHTS
      state_color: true
    entities:
      - entity: light.patio_lights
        state_color: true
      - entity: switch.pool_patio
        state_color: true
      - entity: light.driveway_path_lights
        state_color: true
      - type: custom:slider-entity-row
        entity: light.driveway_string_lights
        toggle: true

Not supposed to be used OUTSIDE the Entities card.

THANK YOU! Worked perfect.

It also fixed some oddity in one of my Lovelace dashboards where the fold would not work unless you waited like 5-10 seconds after opening that dashboard. Whatā€™s weird is that the same ā€˜badā€™ code (but many other different cards) opened fine in another dashboard. Anyhow, allā€™s wellā€¦

1 Like