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

Allow badge customization #84

Open
bemble opened this issue Feb 9, 2022 · 2 comments
Open

Allow badge customization #84

bemble opened this issue Feb 9, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bemble
Copy link
Collaborator

bemble commented Feb 9, 2022

On some cards I want to display a badge on the icon. For example, I have multiple alarm panels, sometimes they have a different state and I want to see it on the alarm panel card:
Capture d’écran 2022-02-09 à 18 10 06

The idea is to add these card configuration:

  • badge_sensor: the sensor used to know whether the badge should be displayed or not
  • badge_color: the badge color
  • badge_icon: the icon displayed in the badge

Problem raised: the editor will have a lot of information, it would be great to create foldable sections or tabs.

@bemble bemble added the enhancement New feature or request label Feb 9, 2022
@bemble bemble added this to the 1.1.0 milestone Feb 9, 2022
@bemble bemble self-assigned this Feb 9, 2022
@bemble bemble mentioned this issue Feb 17, 2022
@SaSa1983
Copy link

SaSa1983 commented Apr 7, 2022

for template cards/chips use the template syntax

also i would restructure those options

badge:
show_if: {{ states('sensor.temperature') > 50 }}
icon: mdi:icon
color: yellow

Using "show_if" with template syntax instead of a binary sensor allows more flexibility.
The template should return a boolean.

icon or color should support template syntax for more complex selections

@johannes-z
Copy link

I'm really missing the badge options for the entity card. @piitaya - do you want this in mushroom? I could open a PR for the entity card if so.

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

No branches or pull requests

3 participants