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

Label whitelist gets ignored in custom project #117260

Open
ewintr opened this issue May 11, 2024 · 3 comments · May be fixed by #117454
Open

Label whitelist gets ignored in custom project #117260

ewintr opened this issue May 11, 2024 · 3 comments · May be fixed by #117454

Comments

@ewintr
Copy link

ewintr commented May 11, 2024

The problem

I have set up a custom project in my configuration.yaml, as described in the documentation, like this:

calendar:
  - platform: todoist
    token: [TOKEN]
    custom_projects:
      - name: my_project
        include_projects:
          - Project 1
          - Project 2
        labels:
          - label

When I look in the calendar, I see all tasks from Project 1 and Project 2, regardless of their labels. If I comment out the lines for include_projects and only specify the labels, I get all the tasks of all projects.

Maybe I configured it wrong, this is the first time I am using the custom projects feature, but this should work, right?

What version of Home Assistant Core has the issue?

core-2024.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

todoist

Link to integration documentation on our website

https://www.home-assistant.io/integrations/todoist/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @boralyl, mind taking a look at this issue as it has been labeled with an integration (todoist) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of todoist can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign todoist Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


todoist documentation
todoist source
(message by IssueLinks)

@boralyl
Copy link
Contributor

boralyl commented May 11, 2024

@ewintr I believe this is related to this comment: #89715 (comment)

What that comment means related to this issue is that if you have a task in either Project 1 or Project 2 and it contains a label named label, the calendar entity's state will be on. It will also show that task in the entity's extra attributes under the all_tasks key. However on the calendar view it will only include all tasks from either Project 1 or Project 2 since the calendar only filters based on include_projects.

It's been a while since I looked at it, but I'm pretty convinced that it should just also filter the calendar view by due_date_days and labels, just like it is already doing for include_projects.

I'll see if I can try to get a PR up to address this in the next few weeks.

@ewintr
Copy link
Author

ewintr commented May 12, 2024

Ah, I think I understand. Thanks for the swift reply!

@boralyl boralyl linked a pull request May 14, 2024 that will close this issue
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants