Skip to content

Update Vivotek camera component#26754

Merged
MartinHjelmare merged 3 commits into
home-assistant:devfrom
HarlemSquirrel:vivotek-cam-20190919
Sep 22, 2019
Merged

Update Vivotek camera component#26754
MartinHjelmare merged 3 commits into
home-assistant:devfrom
HarlemSquirrel:vivotek-cam-20190919

Conversation

@HarlemSquirrel
Copy link
Copy Markdown
Contributor

@HarlemSquirrel HarlemSquirrel commented Sep 20, 2019

Load model name to instance attribute

Description:

  • Load model name to instance attribute
  • Update libpyvivotek to 0.2.2
    • Retrieve camera model name anonymously
    • Raise a more helpful error for invalid creds

Related issue (if applicable): fixes #26607

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

Load model name to instance attribute
Copy link
Copy Markdown
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.

Call add_entities with second argument True to make sure update is called during entity addition.

add_entities(entities, True)

Ensure `update` is called when the entity is added.
https://pypi.org/project/libpyvivotek/0.2.2/
- Retrieve camera model name anonymously
- Raise a more helpful error for invalid creds
Copy link
Copy Markdown
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.

Good!

@MartinHjelmare MartinHjelmare merged commit 2d906b1 into home-assistant:dev Sep 22, 2019
@lock lock Bot locked and limited conversation to collaborators Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vivotek

3 participants