thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.24k stars 113 forks source link

Feature request: hide value #263

Closed sigitm closed 2 years ago

sigitm commented 2 years ago

Hello, I have an auto-entities widget where I include only certain binary sensors with 'on' state .

Therefore, I don't need to read "On" (or "Connected", "Unlocked" etc.. based on its domain) for every row.

I'd like to have an option to hide sensor values. All the horizontal row space would be used to show the sensor icon and description.

It would be useful when horizontal space is not much (e.g. on mobile phones).

Here's a mockup:

now: image

with hidden values image

Thanks

ildar170975 commented 2 years ago

Could be already achieved by:

type: vertical-stack
cards:
  - type: custom:auto-entities
    <<: &ref_settings
      card:
        type: entities
      entities: []
      sort:
        count: 5
    filter:
      include:
        - domain: device_tracker
  - type: custom:auto-entities
    <<: *ref_settings
    filter:
      include:
        - domain: device_tracker
          options:
            type: custom:template-entity-row
            entity: this.entity_id
            state: ''
  - type: custom:auto-entities
    <<: *ref_settings
    filter:
      include:
        - domain: device_tracker
          options:
            card_mod:
              style:
                hui-generic-entity-row $: |
                  .text-content:not(.info) {
                    display: none;
                  }

изображение

The auto-entites is supposed to create a list of elements - and it does it. Additional customizations may be achieved by using custom cards & card-mod.

sigitm commented 2 years ago

Thank you! It worked like a charm! (I used the card-mod version)