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 foscam coordinator #92665

Merged
merged 7 commits into from Dec 22, 2023
Merged

Conversation

krmarien
Copy link
Contributor

@krmarien krmarien commented May 6, 2023

Breaking change

Proposed change

Add foscam coordinator to support later on a switch for toggling the sleep mode

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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 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 May 6, 2023

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

Code owner commands

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

@krmarien
Copy link
Contributor Author

krmarien commented May 6, 2023

Split #81325 -> this includes the coordinator change only

@krmarien krmarien marked this pull request as ready for review May 6, 2023 06:40
Copy link
Member

@gjohansson-ST gjohansson-ST left a comment

Choose a reason for hiding this comment

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

Did a first pass.
There is quite some missing typing and also as you are bumping the library please include a release note or change-diff as mentioned in the PR description.

homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
@home-assistant
Copy link

home-assistant bot commented May 6, 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.

@home-assistant home-assistant bot marked this pull request as draft May 6, 2023 07:42
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 4, 2023
@krmarien krmarien marked this pull request as ready for review August 4, 2023 20:26
@github-actions github-actions bot removed the stale label Aug 4, 2023
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/camera.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft August 5, 2023 12:55
@krmarien krmarien marked this pull request as ready for review August 13, 2023 19:31
@gjohansson-ST gjohansson-ST marked this pull request as draft August 18, 2023 18:06
@krmarien krmarien force-pushed the foscam_coordinator branch 2 times, most recently from bef7150 to 933cbfc Compare September 2, 2023 11:36
@krmarien krmarien marked this pull request as ready for review September 2, 2023 11:36
Copy link
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

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

Please make sure the CI is passing.

Also, please include the reason for creating a coordinator in the description.
The coordinator requests every 30 seconds two endpoints and the camera is not using this data et all. Therefore the coordinator is only being used for the availability property of the camera.

homeassistant/components/foscam/coordinator.py Outdated Show resolved Hide resolved
homeassistant/components/foscam/coordinator.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft September 21, 2023 14:23
@krmarien krmarien marked this pull request as ready for review October 1, 2023 11:49
@home-assistant home-assistant bot requested a review from edenhaus October 1, 2023 11:49
Copy link
Member

@gjohansson-ST gjohansson-ST left a comment

Choose a reason for hiding this comment

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

Add test coverage to the coordinator or exclude it from the tests (preferably you create tests 👍 )

@home-assistant home-assistant bot marked this pull request as draft October 12, 2023 18:39
@krmarien krmarien marked this pull request as ready for review December 19, 2023 18:56
Copy link
Member

@gjohansson-ST gjohansson-ST left a comment

Choose a reason for hiding this comment

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

Thanks @krmarien 👍

@gjohansson-ST gjohansson-ST merged commit 32a5345 into home-assistant:dev Dec 22, 2023
23 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
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.

None yet

3 participants