def update(self):
cameras = self._api.camera_list()<EOL>self._cameras_by_id = {v.camera_id: v for i, v in enumerate(cameras)}<EOL>motion_settings = []<EOL>for camera_id in self._cameras_by_id.keys():<EOL><INDENT>motion_setting = self._api.camera_event_motion_enum(camera_id)<EOL>motion_settings.append(motion_setting)<EOL><DEDENT>self._motion_settings_by_id = {<EOL>v.camera_id: v for i, v in enumerate(motion_settings)}<EOL>
Update cameras and motion settings with latest from API.