Skip to content

Mushroom icon state doesn't correspond to "active_state:" #94

@kasabov

Description

@kasabov

Describe the bug
The icon state in a mushroom row is not active while the timer itself is. Imho both states should be the same at all times.

I have a friend Jeardene who visits me occasionally. I track his visits in a calendar and render the remaining time to his next visit using the timer-bar-card. I also use:

  • an input_datetime helper to track his last visit (via an automation using calendar event) and use it for the "start_time".
  • a card-templater to display the remaining time in days in the "name_template". I couldn't figure out how to do this with the timer-bar-card alone.

Your card configuration

type: custom:card-templater
card:
  mushroom:
    icon_color: accent
  sync_issues: ignore
  type: custom:timer-bar-card
  entity: calendar.jeardene
  active_state: 'off'
  start_time:
    entity: input_datetime.jeardene_last_visit
  invert: true
  bar_direction: rtl
  name_template: >-
    Jeardene visits again in {{ (as_timestamp(state_attr('calendar.jeardene',
    'start_time')) - as_timestamp(now()) ) | timestamp_custom("%j") |int }} days
  text_width: 6em
  icon: mdi:broom
  debug: true
...

Debug information

Screenshot 2023-07-04 at 23 27 03

I'd like the broom icon to be in the same yellow (accent) colour as the timer progress bar is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions