lovelace-animated-background icon indicating copy to clipboard operation
lovelace-animated-background copied to clipboard

Rewrite logic to check config for enabled status

Open xBelladonna opened this issue 5 years ago • 2 comments

Rewrite function enabled() to check conditions for exclusion (explicitly defined or implied) and only enable if none exist. This includes the enable boolean flag which, even if set to true, will not enable animated background if any conditions for exclusion exist.

Fixes #38.

Please comment if any changes, stylistic or pragmatic, are preferred/required.

xBelladonna avatar Nov 26 '20 03:11 xBelladonna

This, unfortunately, runs into the problem I was trying to explain. Includes are designed to override excludes. This change would essentially flip the logic, which could have been done by just moving the exclude checks below the include checks. Admittedly, it was a poorly designed system from the start.

My eventual plan was to implement the same exception system I have setup in Custom-Sidebar, which would give you the option to explicitly define the parameters of your includes/excludes and every combination.

Villhellm avatar Dec 02 '20 15:12 Villhellm

I will start working on that implementation (hopefully) sometime this month. Until then I suggest you use the branch you created here in your HA instance as a temporary workaround.

Villhellm avatar Dec 02 '20 15:12 Villhellm