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

Blocklist does not work with multiple words or phrases #1148

Closed
2 tasks done
f0ggy987 opened this issue Sep 14, 2023 · 4 comments
Closed
2 tasks done

Blocklist does not work with multiple words or phrases #1148

f0ggy987 opened this issue Sep 14, 2023 · 4 comments

Comments

@f0ggy987
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Entering:

PC,Pay Day

into the blocklist will not block any events, even when these words appear in the event title.

Additionally the documentation is not clear on formatting required for the blocklist:

  • How are multiple words to be specified (comma separated?)
  • How are phrases to be specified (single or double quotes?)

Expected behaviour

Entering:

PC,Pay Day

into the blocklist should block events with either PC or the phrase Pay Day in their title from appearing

Example title - Expected behavior:

PC session - should be blocked
Pay Day - should be blocked
Pay the Day Cleaner - should NOT be blocked

Steps To Reproduce

Enter a comma separated list of words into the blocklist

Mode

Event (default)

Card Version

7.7.1

Home Assistant Version

2023.9.2

Configuration

type: custom:atomic-calendar-revive
name: Calendar
enableModeChange: true
entities:
  - entity: calendar.family
    name: Family
  - entity: calendar.boston_celtics_calendar_nba
    name: Boston celtics calendar (nba)
  - entity: calendar.[redacted]
    name: Google Calendar
  - entity: calendar.holidays_in_united_states
    name: Holidays in united states
  - entity: calendar.[redacted]
    name: [redacted]
    blocklist: PC,Pay Day
compactMode: false
hoursOnSameLine: false
sortByStartTime: true
showLocation: true
showDate: true
showCurrentEventLine: true
showDescription: false
showFullDayProgress: false
showDatePerEvent: true
showAllDayHours: true
showCalendarName: false
showEventDate: true
showMultiDay: true
showMultiDayEventParts: false
showMonth: false
showEventIcon: false
showTimeRemaining: false
maxDaysToShow: 7
showLoader: false
showRelativeTime: false
offsetHeaderDate: true
showProgressBar: false
showWeekDay: true
showNoEventsForToday: true

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct
@f0ggy987 f0ggy987 added the type/bug Something isn't working label Sep 14, 2023
@github-actions
Copy link

Hello @f0ggy987, thank you for your interest in our work!
If this is a bug report, please provide your configuration and any screenshots that would assist troubleshooting, otherwise we can not help you.

@marksie1988
Copy link
Collaborator

The description states that it takes regex in the documentation, try this

(PC|Pay Day)

Or

(?:PC|Pay Day)

@f0ggy987
Copy link
Author

Thank you for the quick response! From a quick test it looks like the solution is:

(PC|Pay Day)

I thought I had previously tried a RegEx, unsuccessfully but I guess I must have typed it incorrectly :-)

Someone on the forum claimed a comma-separated list worked for them, which sent me down that path.

Thanks again!

@marksie1988
Copy link
Collaborator

When I first implemented this it was comma separated, but I realised that limited the filter somewhat so moved to regex to allow much more flexibility.

There may even be scenarios where Commas would work for single word filters

@marksie1988 marksie1988 removed the type/bug Something isn't working label Sep 14, 2023
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