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

JavaScript snippet animations are sometimes only evaluated the first time! #147

Closed AmoebeLabs closed 2 years ago

AmoebeLabs commented 2 years 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

Some of the JS is only evaluated the first time. Debugging shows the value is replaced.

This happens to be a known feature of the replace, so keep a copy before calling this.

To Reproduce

Steps to reproduce the behavior: Structure OK:

 me: '[[[]]]'
 you: '[[[]]]'

Not OK:

  me:
    deeper: '[[[]]]'  # Replace by result, due to recursive flow!!!!!

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.