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

Wrong camera type & missing sensors when multiple Netatmo camera #16490

Merged
merged 1 commit into from
Sep 10, 2018
Merged

Wrong camera type & missing sensors when multiple Netatmo camera #16490

merged 1 commit into from
Sep 10, 2018

Conversation

vikramgorla
Copy link
Contributor

@vikramgorla vikramgorla commented Sep 8, 2018

Description:

Fixed an issue with Netatmo discovery where the camera_type (Camera Model) was incorrectly mapped for 2nd and subsequent cameras when their models were different from first camera.

The function get_camera_type was used incorrectly - it was accepting camera name as input but was not used, was always looping across all cameras and returning camera type of first camera as return string.

I suspect that a latent bug exist with another function update_event as it is using self.camera_type which is None, no change in functionality of that event updater with this PR, but has to be fixed later if binary sensors need specific events.

Related issue (if applicable): fixes #16331

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

…tmo cameras

fixed get_camera_type as it was originally not consuming any input, was looping with all cameras and the first camera type was retutned, modified to call cameraType using provided camera name.
@homeassistant
Copy link
Contributor

Hi @vikramgorla,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@ghost ghost added the in progress label Sep 8, 2018
@fabaff fabaff changed the title bugfix - wrong camera type & missing sensors when multiple netatmo camera Wrong camera type & missing sensors when multiple Netatmo camera Sep 8, 2018
@pvizeli
Copy link
Member

pvizeli commented Sep 10, 2018

A cleanup would be nice. This class look very wired ⏬

@pvizeli pvizeli merged commit e96635b into home-assistant:dev Sep 10, 2018
@ghost ghost removed the in progress label Sep 10, 2018
@pvizeli pvizeli added this to the 0.78.0 milestone Sep 10, 2018
balloob pushed a commit that referenced this pull request Sep 11, 2018
…tmo cameras (#16490)

fixed get_camera_type as it was originally not consuming any input, was looping with all cameras and the first camera type was retutned, modified to call cameraType using provided camera name.
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
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.

Netatmo - Incorrect camera type when there are more than one cameras
4 participants