thomasloven/lovelace-fold-entity-row

type: section causes line to appear above row

bru73f0rc3 opened this issue · 8 comments

Hi,
Love this plugin! it helps me avoid the super ugly use of input_booleans and conditional cards, and works incredibly with auto-entities. :)

When using type: section, a thin line shows up above the fold row. it's not a divider, it's more faint and goes entirely across the card.
Also, it doesn't seem to happen when using type: entity. (see image)

      - type: entities
        entities:
          - sensor.family_room_hue_sensor_temperature
          - type: custom:fold-entity-row
            head:
              type: entity
              entity: binary_sensor.family_room_hue_sensor_motion
              secondary_info: last-changed
            entities:
              - sensor.family_room_hue_sensor_temperature
          - type: custom:fold-entity-row
            head:
              type: section
              label: "IR Control"
            entities:
              - entity: switch.ir_fr_samsung_tv_power_on_off

screenshot_fold_entity

I can't tell if this is intentional as i couldn't find a mention of it in the docs. But if it is, is there a way to just have the fold row include only a title without the line (like the type: entity)?

Using Home Assistant 0.104.3 / Build 12 of fold-entity-row from HACS

Thank you for your work on this!

Section is a feature of Home Assistant, not of fold-entity-row
https://www.home-assistant.io/lovelace/entities/#section

I never knew that, but that makes sense. thanks! :)
Do you have a recommendation of how to get a label for the row without an entity or the line above?
I was thinking to possibly use type: markdown but that fails with "undefined is not an object (evaluating 't.entity.split'), and having head: "text" tried to evaluate "text" as an entity.

If it's not possible at the moment, that's fine and i'll deal, but figured i would ask anyway.
thanks!! :)

Fun fact, btw. The section row exists because of fold-entity-row.
I wanted something like what you want to go with it, but there wasn't. So I made something and had it pulled into core hass. Then it changed a bit to be a better row overall, but a worse fit with fold-entity-row... 🤷‍♂

:) that's funny. but i'm sure people find it useful.
dummy-entity-row works perfectly for what i needed! thanks!!
I'm assuming there's no way to have the dummy row without any clickable entity (ie, only a header)?
it's a very minor point either way.
Also, you should add an example of using dummy-entity-row to the fold-entity-row README, would probably save you overhead of these kinds of questions and let you focus on all the excellent plugins you produce!! ;)

actually... I have another plugin for that niche... https://github.com/thomasloven/lovelace-template-entity-row

haha!! of course you do, and it's exactly what i was looking to do with some of my fold-entity-rows.
Thanks man!!!

Hey!
thanks a lot for this great plugin. This thread was very helpful for my problem. I installed the template-entity-row plugin and it works, but how do I bind the template-entity-row into the header of the fold-entity-row plugin?

I tried this:

  • entities:
    - type: custom:template-entity-row
    name: 'Wetterdaten'
    secondary: "von {{states('sensor.time')}} Uhr"
    - type: custom:fold-entity-row
    head: Wetterdaten
    entities:
    - entity: sensor.wupws_uv
    - entity: sensor.wupws_preciprate
    - entity: sensor.wupws_preciptotal
    - entity: sensor.wupws_windspeed

but it doesn't work.

charoon