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

Implement ezviz PTZ & switches #32451

Closed
wants to merge 5 commits into from
Closed

Implement ezviz PTZ & switches #32451

wants to merge 5 commits into from

Conversation

BaQs
Copy link
Contributor

@BaQs BaQs commented Mar 3, 2020

Breaking change

Proposed change

Implemented PTZ, and different switchez to the Ezviz camera component.
Like the ability to switch on/off the Infra Red, the Led, the movement detection.

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

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
  • 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

@probot-home-assistant
Copy link

Hey there @BaQs, mind taking a look at this pull request as its been labeled with a integration (ezviz) you are listed as a codeowner for? Thanks!

@BaQs
Copy link
Contributor Author

BaQs commented Mar 8, 2020

Hey there @BaQs, mind taking a look at this pull request as its been labeled with a integration (ezviz) you are listed as a codeowner for? Thanks!

Indeed I am :)
But if somebody with proper HASS/Python skills would review it, should be even better !

@BaQs BaQs removed their assignment Mar 8, 2020
Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

How about adding some tests for these?

homeassistant/components/ezviz/camera.py Outdated Show resolved Hide resolved
@MartinHjelmare MartinHjelmare changed the title Implement PTZ & switches Implement ezviz PTZ & switches Mar 16, 2020
@BaQs
Copy link
Contributor Author

BaQs commented Mar 21, 2020

How about adding some tests for these?

I aggree, but I would need some help & some time for this :)

@bdraco
Copy link
Member

bdraco commented Mar 21, 2020

@BaQs It looks like you are implementing switches as services.

Please use the switch platform

https://developers.home-assistant.io/docs/entity_switch

@BaQs
Copy link
Contributor Author

BaQs commented Mar 22, 2020

@BaQs It looks like you are implementing switches as services.

Please use the switch platform

https://developers.home-assistant.io/docs/entity_switch

I'm trying to implement switches properly.
If I generate the entities from the camera.py, it's considered as a camera...
If I create a new switch.py and properly setup the platform, I have no way to parse the already-existing cameras.
I did not find any code I could read as an example.

What would you suggest ?

@bdraco
Copy link
Member

bdraco commented Mar 23, 2020

@BaQs It looks like you are implementing switches as services.
Please use the switch platform
https://developers.home-assistant.io/docs/entity_switch

I'm trying to implement switches properly.
If I generate the entities from the camera.py, it's considered as a camera...
If I create a new switch.py and properly setup the platform, I have no way to parse the already-existing cameras.
I did not find any code I could read as an example.

What would you suggest ?

You will need to centralize your configuration logic:

Checkout https://developers.home-assistant.io/docs/creating_component_generic_discovery

The wled integration is a good example.

@stale
Copy link

stale bot commented Apr 23, 2020

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.

@stale stale bot added the stale label Apr 23, 2020
@stale stale bot closed this Apr 30, 2020
@lock lock bot locked and limited conversation to collaborators May 6, 2020
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