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

Bar not showing #181

Open
vaderag opened this issue Nov 20, 2024 · 2 comments
Open

Bar not showing #181

vaderag opened this issue Nov 20, 2024 · 2 comments

Comments

@vaderag
Copy link

vaderag commented Nov 20, 2024

Describe the bug
I've tried to follow the documentation but can't seem to get the bar showing - this is most likely user error but I don't really know where else to go for help!
I think this should be simple as I don't need to pull specific attributes etc

Your card configuration


type: custom:timer-bar-card
entity: sensor.p1s_01p00a380200353_remaining_time
duration:
  units: minutes
bar_width: 60%

mushroom:
  color: green
...

image
image

Debug information
State: 369 (state mode = idle)
Mode: idle (explicit; guess mode produces N/A)
Duration: second
Time remaining:
Counter:
Attr: {"unit_of_measurement":"min","device_class":"duration","friendly_name":"P1S_01P00A380200353 Remaining time"}

@rianadon
Copy link
Owner

Sorry I haven't been as responsive in the issue tracker as I've usually been.

This use case does require a bit of configuration. Really the only simple thing to configure are timers, which have the status of the timer as the state and the time remaining as an attribute. Yours instead as the time remaining as a state.

Something like this should work:

type: custom:timer-bar-card
entity: sensor.p1s_01p00a380200353_remaining_time
duration:
  fixed: 07:00:00 # TODO: Set this to how long your timer is
remain_time:
  state: true # Configures time remaining from state
  units: minutes
guess_mode: true # Guesses the timer status from time remaining
bar_width: 60%

mushroom:
  color: green
...

If the timer duration is variable, you'll need another entity with more information about the timer to configure the card. The card doesn't have access to Home Assistant's history, so it can't figure out the initial duration before the timer started counting down.

@vaderag
Copy link
Author

vaderag commented Jan 20, 2025

Sorry I haven't been as responsive in the issue tracker as I've usually been.

This use case does require a bit of configuration. Really the only simple thing to configure are timers, which have the status of the timer as the state and the time remaining as an attribute. Yours instead as the time remaining as a state.

Something like this should work:

type: custom:timer-bar-card
entity: sensor.p1s_01p00a380200353_remaining_time
duration:
fixed: 07:00:00 # TODO: Set this to how long your timer is
remain_time:
state: true # Configures time remaining from state
units: minutes
guess_mode: true # Guesses the timer status from time remaining
bar_width: 60%

mushroom:
color: green
...
If the timer duration is variable, you'll need another entity with more information about the timer to configure the card. The card doesn't have access to Home Assistant's history, so it can't figure out the initial duration before the timer started counting down.

Thanks for your response...

I just tried the above, and sadly still doesn't seem to work
This is the output
Image

(and just for clarity posting my code below:

type: custom:timer-bar-card
entity: sensor.p1s_01p00a380200353_remaining_time
duration:
  fixed: "5:00:00"
remain_time:
  state: true
  units: minutes
guess_mode: true
bar_width: 60%
mushroom:
  color: green

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

2 participants