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 integration for Shark IQ robot vacuums #38272

Merged
merged 26 commits into from Aug 30, 2020

Conversation

ajmarks
Copy link
Contributor

@ajmarks ajmarks commented Jul 27, 2020

Proposed change

Add a new integration, sharkiq, for Shark IQ robot vacuums.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
sharkiq:
  - username: USERNAME
    password: PASSWORD

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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@ajmarks ajmarks changed the title Add sharkiq for Shark IQ robot vacuums Add sharkiq integration for Shark IQ robot vacuums Jul 27, 2020
@frenck frenck added this to Incoming in New Integrations via automation Aug 3, 2020
Copy link
Contributor

@timmo001 timmo001 left a comment

Choose a reason for hiding this comment

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

Really cool so far. Very ambitious with your test coverage 😄 👍

I've left a few pointers of what needs coverage to hopefully help you get your coverage past the target 🧪

homeassistant/components/sharkiq/sharkiq.py Outdated Show resolved Hide resolved
homeassistant/components/sharkiq/update_coordinator.py Outdated Show resolved Hide resolved
@MartinHjelmare MartinHjelmare added this to Needs review in Dev Aug 16, 2020
@ajmarks ajmarks closed this Aug 25, 2020
Dev automation moved this from Needs review to Cancelled Aug 25, 2020
New Integrations automation moved this from Incoming to Cancelled Aug 25, 2020
@ajmarks ajmarks reopened this Aug 25, 2020
Dev automation moved this from Cancelled to Incoming Aug 25, 2020
@ajmarks
Copy link
Contributor Author

ajmarks commented Aug 25, 2020

Friggin' github app 😠

ajmarks and others added 14 commits August 26, 2020 17:27
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Dev automation moved this from Incoming to Reviewer approved Aug 30, 2020
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉 🎉 🎉 🎉 🎉

New Integrations automation moved this from Cancelled to Reviewer approved Aug 30, 2020
@balloob balloob merged commit 3d1ff5b into home-assistant:dev Aug 30, 2020
Dev automation moved this from Reviewer approved to Done Aug 30, 2020
New Integrations automation moved this from Reviewer approved to Done Aug 30, 2020
@springstan springstan mentioned this pull request Aug 30, 2020
21 tasks
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please address the comments in a new PR. Thanks!

homeassistant/components/sharkiq/__init__.py Show resolved Hide resolved
homeassistant/components/sharkiq/__init__.py Show resolved Hide resolved
homeassistant/components/sharkiq/__init__.py Show resolved Hide resolved
homeassistant/components/sharkiq/__init__.py Show resolved Hide resolved
homeassistant/components/sharkiq/vacuum.py Show resolved Hide resolved
tests/components/sharkiq/test_config_flow.py Show resolved Hide resolved
tests/components/sharkiq/test_config_flow.py Show resolved Hide resolved
tests/components/sharkiq/test_shark_iq.py Show resolved Hide resolved
ayla_api = MockAyla()
shark_vac = _get_mock_shark_vac(ayla_api)
coordinator = SharkIqUpdateCoordinator(hass, None, ayla_api, [shark_vac])
shark = SharkVacuumEntity(shark_vac, coordinator)
Copy link
Member

Choose a reason for hiding this comment

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

We should not create entity instances directly in tests for integrations. Set up the integration and let it add an entity. Then assert the entity state from the core state machine, hass.states.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ajmarks ajmarks deleted the sharkiq branch August 31, 2020 14:04
@ajmarks ajmarks mentioned this pull request Sep 2, 2020
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants