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

Feature request: entity whitelist (inverse of ignore rule) #121

Open
danielrosehill opened this issue Apr 1, 2024 · 1 comment
Open

Comments

@danielrosehill
Copy link

I'm configuring Watchman to notify of unavailable lights (specifically).

Currently the only way for me to achieve this is to:

1: Run an offline entities report
2: Add all the notification groups I don't want to hear about by adding them as ignore options (scene., sensor. etc).

It would be great if there were the inverse option of ignore -- a whitelist (only report on entities matching these conditions).

Then I could just add: light.* to achieve the same functionality.

@nbetcher
Copy link

nbetcher commented Aug 2, 2024

In theory there should be a way since (for some bizarre reason, versus re.match()) the author is using fnmatch() on each entity and service while building the list and, because of that, Unix filenaming globbing like this SHOULD work (but for some reason, doesn't):

!(notify.pushover)
+(!(notify.pushover))
?(!(notify.pushover))
@(!(notify.pushover))

(That assumes the only whitelisted entity or service would be notify.pushover and everything else gets blacklisted.)

Ideally it would be switched to re.match() since these in particular are not filenames in the first place (fnmatch() = File Name Match), then we could take the guess-work out of it and "simply" put:

^((?!notify\.pushover).)*$

Or yes, add a whitelist-only mode. ;)

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

No branches or pull requests

2 participants