Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite logic to check config for enabled status #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xBelladonna
Copy link

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.

Only enable if there are no conditions for exclusion
@Villhellm
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug report: Configuration options overriding each other
2 participants