AmoebeLabs / swiss-army-knife-card

The versatile custom Swiss Army Knife card for Home Assistant allows you to create your unique visualization using several graphical tools, styling options and animations.
224 stars 19 forks source link

[question] Is 'theme' attr supported for the cards? #176

Closed dedepene closed 1 year ago

dedepene commented 1 year ago

Bug report notice

Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!

So make sure your problem is not related to that!

Bug description

I'm trying to get the example battery card to work with proper colors while I'm using a theme (NM-Gonsboro) different from the one it's designed for (Material 3 theme D06, TealBlue). Does the custom card take the "theme:" attribute at all so I can apply D06 just for this card? So far had no luck with this:

          - type: horizontal-stack
            cards:        
              - type: 'custom:swiss-army-knife-card'
                theme: m3-d06-tealblue
                entities:

                  - entity: sensor.galaxy_watch5_j73x_battery_level
                    name: 'Watch'

                layout:
                  template:
                    name: sak_layout_fce_sensor2
                    variables:
                      - sak_layout_sensor_name_above_state: false
                      - sak_layout_sensor_colorstops_template: colorstops_battery_level
                      - sak_layout_sensor_icon_style: colorstops
                      - sak_layout_sensor_segarc_style: colorstops
                      - sak_layout_sensor_segarc_scale_max: 100

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop browser (please complete the following information):

Companion App on Smartphone/Tablet (please complete the following information):

Additional context Add any other context about the problem here.

(Optional): Suggested Solution

Any suggested solution to this bug.

github-actions[bot] commented 1 year ago

Thank you for creating your first issue for the Swiss Army Knife custom card!

AmoebeLabs commented 1 year ago

No, at this moment you cannot specify a theme for a single card.

I would have to check how this should be done. I assume that other cards are able to use a specific theme? In other words, I could check that code how this is done?

AmoebeLabs commented 1 year ago

Closed with #218