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

Can I use this without entity/entities? #146

Open
pickonedev opened this issue Apr 21, 2024 · 5 comments
Open

Can I use this without entity/entities? #146

pickonedev opened this issue Apr 21, 2024 · 5 comments

Comments

@pickonedev
Copy link

Hi!

Can this addon be used without any entities?
I just want to add a start time and an end time, with no entity, just a simple countdown.

Thanks

@rianadon
Copy link
Owner

Yup (see documentation). This recently got added.

@pickonedev
Copy link
Author

Uhhh... I think is hard for me to find exactly how to do this, even with the documentation for which I thank you pointing to me.
If I don't ask too much, can you please show me a card code which do this without entity?
Let's say that I have a value of 300 seconds and I want them to decrese, how, more exactly, the code of the card, will look like?

Thank you in advance!

@pickonedev
Copy link
Author

No one knows? :-(

@rianadon
Copy link
Owner

rianadon commented Apr 26, 2024

I'm pretty much the only one who answers questions in these issues, except for when multiple people have the same problem and help each other out. So you're stuck with me 😈 .

image

This is the configuration I used:

type: custom:timer-bar-card
entities:
  - name: Mystery
    icon: mdi:help
    state:
      fixed: active
    start_time:
      fixed: '2024-04-26T03:05:54.416Z'
    duration:
      fixed: '00:20:00'

Instead of duration you can also use end_time to specify the end.

Hope that helps! I should probably add this one to the examples.

I should also add that the card requires the start time to be fixed when configuring it this way. This ensures that the timer is still counting down from where it left off if you reload the page or open Home Assistant on another device. However, if you really want a timer that restarts whenever you load the dashboard, you can use the Templatable Configuration Card and set start_time to ${new Date().toISOString()}.

@piemanpm
Copy link

piemanpm commented Sep 3, 2024

Hi. Just wondering if you could help.

I'm trying to do something similar. I've installed timer-bar-card and Templatable Configuration Card that you linked using HACS.

I'm trying to get a simple 4 hour timer working where I tap the button and it starts the 4 hour timer.

I currently have

entities:
  - name: 4H timer
    icon: mdi:medication
    state:
      fixed: active
    start_time:
      fixed: ${new Date().toISOString()}
    duration:
      fixed: '04:00:00'

But I get the error "No entity provided for more info dialogue" when I try and run it.

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

3 participants