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.
223 stars 19 forks source link

Action doesn't work with multiple entity indexes #207

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

The version you are using. See HACS or the Browser console v2.4.2

Bug description

A clear and concise description of what the bug is.

See: https://community.home-assistant.io/t/lovelace-versatile-swiss-army-knife-custom-card/432419/161

To Reproduce

Steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen. The action/tap handler should work as with a single entity.

Screenshots

If applicable, add screenshots to help explain your problem.

image

image

- type: icon
            position:
              cx: 50
              cy: 50
              align: start
              icon_size: 20
            entity_indexes:
              - entity_index: 7     # Fan mode Quiet
              - entity_index: 6     # On/Off
            user_actions:
              tap_action:
                haptic: success
                actions:
                  - action: call-service
                    service: climate.set_fan_mode
                    service_data:
                      fan_mode: quiet
            animations:
              - state: "quiet"
                styles:
                  icon:
                    animation: spin 5s linear infinite
                    fill: var(--md-fg-color--alert)
                    color: var(--md-fg-color--alert)
              - state: "quiet"
                operator: '!=' 
                styles:
                  icon:
                    fill: gray 
              - state: "off"
                entity_index: 6
                styles:
                  icon:
                    fill: gray

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.