Anniversaries icon indicating copy to clipboard operation
Anniversaries copied to clipboard

IMPROVEMENT: Years minus 1 for todays birthdays

Open mn-box opened this issue 2 years ago • 1 comments

Love this and I have below on my dashboard and tablet on the wall. My suggestion / request is to add another attribute so that below overview works. I can choice between current_years and years_at_next_anniversary. The latter is great for all upcoming birthdays to show what age they will turn. But it doesn't work for the one having its birthday today. The first name in my screenshots turns 9 today (and not 10). Can this be incorporated in a next release? Or are there other ways of showing this using the auto-entities

image'

Code:

        - type: custom:auto-entities
          card:
            type: entities
          filter:
            include:
              - entity_id: sensor.anniversary*
                options:
                  type: custom:multiple-entity-row
                  secondary_info:
                    attribute: date
                    format: date
                  entity: this.entity_id
                  entities:
                    - attribute: years_at_next_anniversary # current_years
                      unit: jaar

I can of course split this into 2 cards, but would like to have one card and one overview.

Thanks!

mn-box avatar Jun 23 '22 21:06 mn-box

Same problem on my dashboard

martin131 avatar Jul 18 '22 11:07 martin131

Here's how I fixed what I believe is the same issue. Here you can see a demo of it on my HA dashboard.

JonGilmore avatar Dec 05 '22 01:12 JonGilmore

I'm thinking that rather than add a new attribute, I'll just alter the existing so that if the anniversary is today, it shows the age today. My logic: The sensor counts to the next event. On the day of the event, the count is 0, so, still 0 to the next event, so still 9 in the example given ie. the sensor isn't actuall counting to the next event on the day itself if that makes sense

pinkywafer avatar Feb 16 '23 17:02 pinkywafer