Entity card that sorts?

If I have a bunch of event sensors that have a state of the number of days until that event happens, is there a lovelace card that can always sort those by when coming next? Also would be kind of cool if there was a way to have a section at the top that shows today’s events, with a line under it and then all the other events below it. Not sure if there are ways to do that.

So basically like this and do have all the below info in each sensor but in my case have separate sensors and automations and not baked into the card:
image

have a look at this custom card:
https://github.com/thomasloven/lovelace-auto-entities

That’s a great suggestion thank you. I’ve got it working other than right now can’t get the secondary_info to display I want or at all. That said and assuming it can be done thru that card is there a way to do like above where in my case when the state is 0, show Today instead of 0 days.

I would probably break it into 2 cards. Top card using a filter to only show “today” and boron card for anything older than 0 day. I do something similar for my batteries. 1 for batteries une 10% and another for all batteries

Thanks. Which card would you use if you don’t want to show 0 Days physically and show Today? So oddly today is someone’s anniversary so can show what I got so far:

And my card is a vertical stack with anything that is in a state of 0 in the top part and anything that is not on the bottom:

cards:
  - type: 'custom:auto-entities'
    show_empty: true
    card:
      type: entities
      title: Events
      show_header_toggle: false
    filter:
      include:
        - entity_id: /birthday/
          state: '0'
        - entity_id: /anniversary/
          state: '0'
      exclude:
        - entity_id: /reminder/
    sort:
      method: state
      numeric: true
  - type: 'custom:auto-entities'
    show_empty: true
    card:
      type: entities
      show_header_toggle: false
    filter:
      include:
        - entity_id: sensor.birthday.*
          not:
            state: '0'
        - entity_id: sensor.anniversary.*
          not:
            state: '0'
      exclude:
        - entity_id: /reminder/
    sort:
      method: state
      numeric: true
type: vertical-stack
1 Like

for that I would probably create a template sensor and replace 0 with “Today”

Can I do that when the entity at the top would be dynamic? Would I have to create one for each individual birthday and anniversary?

What kind of entities are these events? Which integration is used to produce them?

Not sure how to describe the kind as they are just sensors but it’s done with the date countdown automation. The info with this sensor is:

image

So get generated thru these actions in the automation:

    - service: python_script.date_countdown
      data:
        name: Teresa
        type: birthday
        date: 11/09/1961

Do you have the source for the python_script? (or a link to it)

You bet:

2 Likes