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 SharkIQ room targeting #89350

Merged

Conversation

funkybunch
Copy link
Contributor

Proposed change

This update adds room targeting support to the SharkIQ integration. Shark has a feature, that is different from spot cleaning, where you can instruct an AI-class robot vacuum to clean specific rooms that the robot knows. This allows for this room-level control in Home Assistant through a new service: sharkiq.clean_room.
Screenshot 2023-03-08 at 1 25 01 AM

NOTE: This PR will require this dependency update to merge: #89346

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
  • The code has been formatted using Black (black --fast 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Mar 8, 2023

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

Code owner commands

Code owners of sharkiq 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 sharkiq Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@epenet epenet marked this pull request as draft March 8, 2023 07:08
@funkybunch funkybunch marked this pull request as ready for review March 8, 2023 07:09
@epenet
Copy link
Contributor

epenet commented Mar 8, 2023

Marking as draft, because it depends on a previous PR.
Please avoid opening too many PRs until the dependency bump is accepted/merged as it creates pointless CI full runs.

@epenet epenet marked this pull request as draft March 8, 2023 07:10
@funkybunch funkybunch marked this pull request as ready for review March 8, 2023 07:11
@funkybunch funkybunch marked this pull request as draft March 8, 2023 07:12
@funkybunch funkybunch mentioned this pull request Mar 8, 2023
19 tasks
@MartinHjelmare MartinHjelmare changed the title SharkIQ Room Targeting Support Add SharkIQ room targeting Mar 8, 2023
@funkybunch
Copy link
Contributor Author

Dependency requirements have been merged to dev - marking as ready for review.

@funkybunch funkybunch marked this pull request as ready for review March 8, 2023 20:59
CODEOWNERS Outdated Show resolved Hide resolved
homeassistant/components/sharkiq/manifest.json Outdated Show resolved Hide resolved
homeassistant/components/sharkiq/vacuum.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft March 9, 2023 06:32
@home-assistant
Copy link

home-assistant bot commented Mar 9, 2023

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.

@funkybunch funkybunch marked this pull request as ready for review March 10, 2023 18:03
@jrlambs
Copy link
Contributor

jrlambs commented Feb 18, 2024

@funkybunch can you mash ready for re-review on emontnemery? I believe I have comments addressed now. @emontnemery no apparently I never dove into the link. It makes complete sense that this history does not need to be tracked. I've added that update.

Exception type has been changed as well.

@funkybunch funkybunch marked this pull request as ready for review February 18, 2024 22:00
@home-assistant home-assistant bot marked this pull request as draft February 26, 2024 19:01
@thejustinwalsh
Copy link

Ayyy! Awesome! I was just thinking about how amazing this feature would be. Is there anything I can do to help? Do we just need to implement the above-suggested change, and we'll be good to go?

@jrlambs
Copy link
Contributor

jrlambs commented Mar 11, 2024 via email

@jrlambs
Copy link
Contributor

jrlambs commented Mar 23, 2024

@funkybunch should be ready for re-review again. I've updated from upstream/dev and addressed the comment.

@funkybunch
Copy link
Contributor Author

Thanks @jrlambs!

@funkybunch funkybunch marked this pull request as ready for review March 23, 2024 15:07
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

This is good to go, just a couple of minor comments which need to be addressed.

fields:
rooms:
required: true
advanced: true
Copy link
Contributor

Choose a reason for hiding this comment

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

The purpose of the advanced flag is to hide service fields from users which have not enabled the "advanced" flag in their user profile. I don't think that's useful here since the rooms service field is not optional?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the detailed explanation here. I think since I updated services.yaml the commit checks yelled at me because my new "clean_rooms" service did not have an icon defined. I created and icons.json file and specified an icon for it and that seems to have done the trick.

Comment on lines 104 to 112
def send_command(
self,
command: str,
params: dict[str, Any] | list[Any] | None = None,
**kwargs: Any,
) -> None:
"""Send a command to the vacuum. Not yet implemented."""
raise NotImplementedError

Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this makes sense, but it's not related to adding the room target service as I understand it? Please move this change to a separate PR.

@home-assistant home-assistant bot marked this pull request as draft March 25, 2024 08:19
@jrlambs
Copy link
Contributor

jrlambs commented Mar 27, 2024

@funkybunch, ready one more time

@funkybunch funkybunch marked this pull request as ready for review March 27, 2024 03:44
@funkybunch
Copy link
Contributor Author

@jrlambs if you haven’t already make sure you sign the CLA. I don’t think it prompted you because I opened the PR originally: https://www.home-assistant.io/developers/cla_sign_start/

Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

Thanks, @funkybunch and @jrlambs 👍

@emontnemery emontnemery dismissed stale reviews from epenet and edenhaus March 28, 2024 13:12

Stale

@emontnemery emontnemery reopened this Mar 28, 2024
@emontnemery emontnemery merged commit 2511a9a into home-assistant:dev Mar 28, 2024
35 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
@funkybunch funkybunch deleted the funkybunch/SharkIQ-Room-Support branch November 4, 2024 22:46
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.