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

Support handling a state value of 'undefined' by animations #109

Closed AmoebeLabs closed 2 years ago

AmoebeLabs commented 2 years ago

The Problem To Be Solved

Currently, the animation handling ignores states of undefined. That seems logical, but in the case of brightness, HA sets that value to undefined once the light is turned off, and as a result, the animation cannot respond to this value anymore. The animation for instance may change colors in this state.

The state operator can't check on state: undefined!

Additional background:

Related Issues (if any)

(Optional): Suggested Solution

Change the implementation of the animation handling so that:

Other states should ignore this value!

(Optional): Alternative Solutions