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

Add get_tasks action to Habitica integration #127687

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

tr4nt0r
Copy link
Contributor

@tr4nt0r tr4nt0r commented Oct 5, 2024

Proposed change

Adds a get_tasks action to the Habitica integration that returns the users tasks and offers various filter options to narrow the result.

This is an alternative way to the task sensors to retrieve task data. Currently the complete json data is dumped in the extra_state_attributes of the task sensors. With this it should be possible to remove or deprecate the extra_state_attributes of these sensors.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Oct 5, 2024

Hey there @asmfreak, @leikoilja, mind taking a look at this pull request as it has been labeled with an integration (habitica) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of habitica can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign habitica Removes the current integration label and assignees on the pull request, 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 pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

homeassistant/components/habitica/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/habitica/__init__.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft October 6, 2024 08:36
@home-assistant
Copy link

home-assistant bot commented Oct 6, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch from d551596 to 9fb8866 Compare October 6, 2024 11:38
@tr4nt0r tr4nt0r marked this pull request as ready for review October 6, 2024 11:40
@home-assistant home-assistant bot requested a review from joostlek October 6, 2024 11:40
@home-assistant home-assistant bot marked this pull request as draft October 6, 2024 11:42
@tr4nt0r tr4nt0r marked this pull request as ready for review October 6, 2024 12:00
@home-assistant home-assistant bot requested a review from joostlek October 6, 2024 12:00
@tr4nt0r tr4nt0r requested a review from joostlek October 6, 2024 12:08
@tr4nt0r tr4nt0r marked this pull request as draft October 6, 2024 12:10
@tr4nt0r tr4nt0r marked this pull request as ready for review October 6, 2024 12:20
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch from 76b6d6f to df3d791 Compare October 9, 2024 19:37
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch from df3d791 to dd418b1 Compare October 11, 2024 16:27
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch from dd418b1 to f30a690 Compare October 25, 2024 12:05
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe also add more test coverage for this?

homeassistant/components/habitica/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/habitica/services.py Outdated Show resolved Hide resolved
@tr4nt0r tr4nt0r requested a review from joostlek October 25, 2024 16:28
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch from b068018 to 8836d90 Compare October 31, 2024 18:37
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch 3 times, most recently from 0c744bd to 63b97a0 Compare November 10, 2024 11:50
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Nov 10, 2024
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch 2 times, most recently from c21a1b9 to 72eb1e5 Compare November 30, 2024 20:34
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a merge conflict, can you take a look?

@home-assistant home-assistant bot marked this pull request as draft December 17, 2024 19:38
@tr4nt0r tr4nt0r marked this pull request as ready for review December 17, 2024 21:25
@home-assistant home-assistant bot requested a review from joostlek December 17, 2024 21:25
@tr4nt0r tr4nt0r force-pushed the habitica_get_tasks branch 6 times, most recently from 592e9e3 to 492d825 Compare December 30, 2024 00:46
@tr4nt0r tr4nt0r marked this pull request as draft December 30, 2024 01:01
@tr4nt0r tr4nt0r marked this pull request as ready for review December 30, 2024 11:46
Copy link
Member

@zweckj zweckj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@zweckj zweckj merged commit 5726d09 into home-assistant:dev Jan 3, 2025
34 checks passed
@tr4nt0r tr4nt0r deleted the habitica_get_tasks branch January 3, 2025 12:29
cereal2nd pushed a commit to cereal2nd/home-assistant that referenced this pull request Jan 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants