thomasloven / lovelace-auto-entities

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

sort by area not working? #345

Closed prankousky closed 1 year ago

prankousky commented 1 year ago

Hi,

I have a card displaying all my light entities; it will work when I sort by friendly_name, but not by area; what am I doing wrong? Code and screenshots below.

According to the documentation, this should work, right? It says

method: Required One of domain, entity_id, name, device, area, state, attribute, last_changed last_updated or last_triggered.

Thank you in advance for your help :)

friendly_name

type: vertical-stack
cards:
  - type: custom:auto-entities
    card:
      type: entities
      state_color: true
      show_header_toggle: false
    filter:
      include:
        - domain: light
          options:
            secondary_info: last-changed
      exclude:
        - entity_id: '*screen'
        - entity_id: '*brightness'
        - entity_id: '*backlight'
        - entity_id: '*gruppe*'
        - entity_id: '*zeitschaltung*'
        - entity_id: '*test'
    sort:
      method: friendly_name
      reverse: false
    show_empty: true

image

area

type: vertical-stack
cards:
  - type: custom:auto-entities
    card:
      type: entities
      state_color: true
      show_header_toggle: false
    filter:
      include:
        - domain: light
          options:
            secondary_info: last-changed
      exclude:
        - entity_id: '*screen'
        - entity_id: '*brightness'
        - entity_id: '*backlight'
        - entity_id: '*gruppe*'
        - entity_id: '*zeitschaltung*'
        - entity_id: '*test'
    sort:
      method: area
      reverse: false
    show_empty: true

image

ildar170975 commented 1 year ago

What happens if this code is removed:

    sort:
      method: area
      reverse: false

?

prankousky commented 1 year ago

Yes! It works, when I remove reverse: false. Thank you!