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.
244 stars 21 forks source link

Fix tool styling for all tools #221

Closed AmoebeLabs closed 1 year ago

AmoebeLabs 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!

Swiss Army Knife version

v2.4.4

Bug description

A clear and concise description of what the bug is. See:

But it seems like more tools have a broken styleMap for the tools part, so check all tools for this!

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.

Working for state, tool says: display: none

image

uom, display: none This is weird, because according to #217, uom styling is not honored. So, how come this works? In different check with secondary entity as on/off, uom keeps at opacity 1...

But it is fixed now 🥳

image

state, display: none (styling gone, so uom displayed to left) image

All normal again: image

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.

stinobook commented 1 year ago

Hello, was just too late to report this for 2.4.5. just updated and tested if this fix fixed it but it didnt. usersvg styling through animations is also not working. if i apply the filter as a main style it works, but not through animations.

                        - type: usersvg
                          position:
                            cx: 75
                            cy: 15
                            height: 30
                            width: 30
                          entity_index: 1
                          styles:
                            usersvg:
                              filter: invert(50%) sepia(17%) saturate(5187%) hue-rotate(321deg) brightness(94%) contrast(89%)
                          style: 'images'
                          images:
                            - default: /local/images/main-brush.png
                          animations:
                            - state: 10
                              operator: <=
                              styles:
                                usersvg:
                                  filter: invert(50%) sepia(17%) saturate(5187%) hue-rotate(321deg) brightness(94%) contrast(89%)
                            - state: 10
                              operator: >
                              styles:
                                usersvg:
                                  filter: unset