bugfix - incorrect camera type and missing sensors when multiple netatmo 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.
This commit is contained in:
vikramgorla 2018-09-10 16:13:05 +02:00 committed by Paulus Schoutsen
parent 1ea8c1ece3
commit 60b45d4ba5

View File

@ -101,10 +101,10 @@ class CameraData:
return self.module_names
def get_camera_type(self, camera=None, home=None, cid=None):
"""Return all module available on the API as a list."""
for camera_name in self.camera_names:
self.camera_type = self.camera_data.cameraType(camera_name)
return self.camera_type
"""Return camera type for a camera, cid has preference over camera."""
self.camera_type = self.camera_data.cameraType(camera=camera,
home=home, cid=cid)
return self.camera_type
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):