Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: put in a specific date to count towards #12

Open
recklessnl opened this issue Feb 25, 2020 · 4 comments
Open

Feature request: put in a specific date to count towards #12

recklessnl opened this issue Feb 25, 2020 · 4 comments

Comments

@recklessnl
Copy link

recklessnl commented Feb 25, 2020

First of all - I love using this card! Its great for reminders.

I think it would be really helpful to allow the card to get a date input, and it would count down towards that date. Example use cases:

  • Would be great to remind yourself for important dates that aren't set in stone and can change.
  • Reminders for renewing SSL certs. The card will countdown toward the day they expire, on a date you set. You can set automations using this card before it expires to remind yourself. Once you renew your certs, you have a new cert with a new expiration date, which might be of a different length compared to the old cert. So you can put in the new date into the check-button-card, click it again, and the card will track it until it's time to renew again.

This would be a great help with keeping track of chores like this that aren't very predictable, this card would be perfect for this.

@PDXPill
Copy link

PDXPill commented Mar 30, 2020

i like the idea, i would like to use it for mantaince.

@recklessnl
Copy link
Author

@Gluwc would you be able to take a look at this? Saw you recently updated this repository again after a while, I think this would be a great addition.

@Gluwc
Copy link
Member

Gluwc commented Aug 27, 2020

I did merge a PR, but I don't have time to work on this card at the moment unfortunately. Hopefully sometime in the future or maybe someone else can make a PR for this.

@ChrisRomp
Copy link
Contributor

FWIW I've used a template sensor to show how many days until a specific date, like so:

days_until_something:
  friendly_name: Something Day
  icon_template: mdi:calendar-check
  value_template: >
    {% set midnight = now().replace(hour=0, minute=0, second=0, microsecond=0).timestamp() %}
    {% set event = '2025-12-31' | as_timestamp %}
    {% set delta = ((event - midnight) // 86400) | int %}
    {% if delta < 0 %}
      {{ -delta }} Days Ago
    {% elif delta == 0 %}
      Today!
    {% elif delta == 1 %}
      Tomorrow
    {% else %}
      In {{ delta }} Days
    {% endif %}

I do like this idea, but maybe this can help in the interim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants